RosettaCodeData/Task/Higher-order-functions/CoffeeScript/higher-order-functions-2.coffee

4 lines
63 B
CoffeeScript
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fn = -> return 8
sum = (a, b) -> a() + b()
sum(fn, fn) # => 16