From: RKA Date: 2013-02-15T05:31:15+09:00 Subject: Re: What are lambda functions used for? --e89a8f502e02d01c7604d5b52390 Content-Type: text/plain; charset=ISO-8859-1 Lambda functions are used when you want to call a function that doesn't necessarily need a name. For example, the each method of the array object iterates through all the items in the array and if you want to execute the same method over and over again with a different argument you can use a lambda function, instead of having to define a function first. Does that answer your question? On Thu, Feb 14, 2013 at 12:06 PM, Mike Glaz wrote: > I'm new to Ruby and lambda functions. I understand how they work but > was wondering when would you use them? > > thanks, mike > > -- > Posted via http://www.ruby-forum.com/. > > --e89a8f502e02d01c7604d5b52390 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Lambda functions are used when you want to call a function= that doesn't necessarily need a name. For example, the each method of = the array object iterates through all the items in the array and if you wan= t to execute the same method over and over again with a different argument = you can use a lambda function, instead of having to define a function first= .=A0

Does that answer your question?


On Thu, Feb 14, 2013 at= 12:06 PM, Mike Glaz <lists@ruby-forum.com> wrote:
I'm new to Ruby and lambda functions. = =A0I understand how they work but
was wondering when would you use them?

thanks, mike

--
Posted via http://= www.ruby-forum.com/.


--e89a8f502e02d01c7604d5b52390--