groovy Currying Right currying


Example

def dividable = { a, b ->
    a % b == 0
}
assert dividable(2, 3) == false
assert dividable(4, 2) == true

def even = dividable.rcurry(2) // b == 2
assert even(2) == true
assert even(3) == false