Talk:Partial function application: Difference between revisions
Content added Content deleted
(→Proposal for new task description: ruby 1.9) |
(→Proposal for new task description: ruby 1.9) |
||
Line 234: | Line 234: | ||
</lang> |
</lang> |
||
Possible-correct Ruby 1.9 implementation: |
|||
<lang ruby> |
<lang ruby> |
||
Line 250: | Line 250: | ||
u = f2.curry[7][9] |
u = f2.curry[7][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| |
, [1,2,3,4,5].map {|x| v[x]} \ |
||
, [1,2,3,4,5].map {|x| w[x]} ] |
|||
</lang> |
</lang> |