Better explained with examples, I need a programming system with the following characteristics:
f = λ a b c -> a + b + c g = apply f 1 2 3 = 6 h = unapply g _ 2 _ = λ b -> 4 + b
Or, to explain with words,
f is a function,
g is that function applied to 3 arguments, and
g "unapplied" to one argument. That is, I need a programming system where you can define functions and apply them to arguments, like the Lambda Calculus. But I also need this system to have an
unapply operator, with which you can recover a partially applied function from the value of its argument.