Talk:Partial function application: Difference between revisions

Content added Content deleted
Line 234: Line 234:
</lang>
</lang>


Not entirely-correct Ruby 1.9 implementation:
Possible-correct Ruby 1.9 implementation:


<lang ruby>
<lang ruby>
Line 250: Line 250:


u = f2.curry[7][9]
u = f2.curry[7][9]
w = g.call(7).call(9)
v = f2.curry[7,9]
w = g[7][9]
puts [ [1,2,3,4,5].map {|x| u[x]} \
puts [ [1,2,3,4,5].map {|x| u[x]} \
, [1,2,3,4,5].map {|x| w.call x} ]
, [1,2,3,4,5].map {|x| v[x]} \
, [1,2,3,4,5].map {|x| w[x]} ]
</lang>
</lang>