RosettaCodeData/Task/First-class-functions/Groovy/first-class-functions-1.groovy

2 lines
43 B
Groovy

def compose = { f, g -> { x -> f(g(x)) } }