groovy Currying Left currying


Example

def pow = { base, exponent ->
    base ** exponent
}
assert pow(3, 2) == 9

def pow2 = pow.curry(2) //base == 2
assert pow2(3) == 8