2 ms·
Similar to that, yes - you have a higher order function, "foo" in this case, that accepts a function as an argument, and returns another function. FWIW, you wa
by Roboprog 10y ago
Similar to that, yes - you have a higher order function, "foo" in this case, that accepts a function as an argument, and returns another function.
FWIW, you want to have an operation to bind the first (or first N) formal parameter to a value, and you want to be able to have an arbitrary number of remaining parameters.
Whatever facility would be in place needs to allow for N remaining formal parameters, of various types, not merely do the ("generic" / templated / type-parameter) recipe for one additional parameter.
I am not a Haskell or F# programmer, but maybe the TS team wants to look at what those languages do.