Jump to content

Function composition: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
(→‎{{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:
 
=={{header|Wren}}==
<syntaxhighlight lang="ecmascriptwren">var compose = Fn.new { |f, g| Fn.new { |x| f.call(g.call(x)) } }
 
var double = Fn.new { |x| 2 * x }
9,485

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.