From: "Kroeger, Simon (ext)" Date: 2006-05-18T23:53:10+09:00 Subject: Re: [OT] Partial functions? > import functional > > def multiply(x, y): > return x * y > > multiply_by_3 = functional.partial(multiply, 3) > > multiply_by_3(4) #=> Will return 12 ruby: gem install rubymurray ----------------------------------------------------------- require 'curry' def multiply x, y x * y end multiply_by_3 = method(:multiply).curry(Curry::HOLE, 3) multiply_by_3.call(4) #=> Will return 12 ----------------------------------------------------------- cheers Simon