RosettaCodeData/Task/First-class-functions/Dyalect/first-class-functions-1.dyalect

6 lines
90 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
func apply(fun, x) { y => fun(x, y) }
func sum(x, y) { x + y }
let sum2 = apply(sum, 2)