Re:Currying in JavaScript
by eurasiantiger on Sunday September 19, 2021 @03:57PM
(#28587386)
The story doesn’t tell, but looking at the Ramda source [1][2][3], it sure looks like it: each application of a curried function creates a new curried function on the fly. Didn’t check deoptigate, but I’m willing to bet V8 doesn’t optimize that well.
1: https://github.com/ramda/ramda/blob/master/source/curry.js 2: https://github.com/ramda/ramda/blob/master/source/internal/_... 3: https://github.com/ramda/ramda/blob/master/source/internal/_...