From: Jesse Merriman Date: 2007-03-26T07:29:57+09:00 Subject: Re: Backus, Functional Programming, and Ruby On Sunday 25 March 2007 18:03, Joel VanderWerf wrote: > Ruby has its own way of doing things, not that there is anything wrong > with defining new ways: > > [[1,2,3], [6,5,4]].transpose.map{|x,y|x*y}.inject{|s,x|s+x} > => 28 Yep, I was just seeing how close I could make Ruby code look like Backus' code; the goal was to define inner_product as a compose of the three other functions without any named variables. -- Jesse Merriman jessemerriman@warpmail.net http://www.jessemerriman.com/