pufuwozu/roy — Issue #42: Make functions curried
Author: eegg
Created: 2011-12-03 21:24:32+00:00
State: open

Given

let f a b c = a + b + c

let g = f 1 2

I get the error

Error: Type error: Function(Number,Number,'bnj) is not Function(Number,Number,Number,Number)

from which I gather functions are not curried. I suggest that they should be; i.e. an unoptimized compilation of the above would give something like

var f = function(a) {
return function(b) {
return function (c) {
return a + b + c;
}
}
}
var g = f(1)(2);