Another Currying Example in Marvin2005-04-12
Please see my previous post before if you haven't done so.
computation a b c d = (a + b^2+ c^3 + d^4)
Then it is filled as follows:
fillOne = computation 1 fillTwo = fillOne 2 fillThree = fillTwo 3 answer = fillThree 5
and the answer is 657. The same thing can be done in Marvin:
[ swap 2 ** + swap 3 ** + swap 4 ** + ] :computation [ 1 \computation ] :fillOne [ 2 \fillOne ] :fillTwo [ 3 \fillTwo ] :fillThree 5 \fillThree