RosettaCodeData/Task/Currying/Wren/currying.wren
2023-07-01 13:44:08 -04:00

4 lines
130 B
Text

var addN = Fn.new { |n| Fn.new { |x| n + x } }
var adder = addN.call(40)
System.print("The answer to life is %(adder.call(2)).")