Function composition: Difference between revisions
Content deleted Content added
→{{header|RPL}}: actually composes 2 functions - previous version only evaluated them one after the other |
m →{{header|Wren}}: Changed to Wren S/H |
||
Line 3,388: | Line 3,388: | ||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">var compose = Fn.new { |f, g| Fn.new { |x| f.call(g.call(x)) } } |
||
var double = Fn.new { |x| 2 * x } |
var double = Fn.new { |x| 2 * x } |