From: sto.mar@... Date: 2013-07-06T04:37:54+09:00 Subject: Re: what is Vector#map2 ? Am 05.07.2013 20:59, schrieb Mike Stok: > > On 2013-07-05, at 2:49 PM, sto.mar@web.de wrote: > >> Am 05.07.2013 20:25, schrieb Love U Ruby: >>> Hi, >>> >>> Can anyone give me one example to understand the functionality of >>> Vector#map2(http://yard.ruby-doc.org/stdlib-2.0/Vector.html#collect2-instance_method). >>> I understand the Vector#map. >>> >>> require 'matrix' >>> >>> a = [1, 2, 3, 4] >>> m = Vector[*a] # => Vector[1, 2, 3, 4] >>> m.map{|i| i * i } # => Vector[1, 4, 9, 16] >> >> Shouldn't be too difficult to find out by looking at the source, >> but anyway: >> [...] > > With pry (and pry-plus) it is easy to get to the source and docs for a method: The source is even included in the docs linked to by the OP... Regards, Marcus --