@tycho01 has closed #78 which was very related to this.
I have the following silly array map
let map = <A, B>(f: (x: A) => B, ar: Array<A>) : Array<B> =>{
let next = ar.pop()
return typeof next !== 'undefined' ? [f(next)].concat(map(f, ar)) : []
}
let cmap = curry(map)
This works just fine until I curry it. Then, no matter how I call it typescript won't compile it with the following error:
error TS2365: Operator '+' cannot be applied to types '{}' and '5'.
cmap(x => x + 5)([1, 2, 3])
Not even when I tell it that x is a number.