I am Software Developer, currently interested in static type languages (TypeScript, Elm, ReScript) mostly in the frontend land, but working actively in Python also. I am available for mentoring.
Currying is not pattern. It is function property. In all FP languages functions are like that, so they are curried.
If you have function f: a ->b->c then by applying only a we have function g: b->c.
In JS as it's not FP language we need to make currying manually by using closures and returning function from function. It doesn't violate any purity as it is exactly FP concept.
I am Software Developer, currently interested in static type languages (TypeScript, Elm, ReScript) mostly in the frontend land, but working actively in Python also. I am available for mentoring.
maybe the second function would need a valued computed from the first function, so it could be use as a pipeline of computed values that are reusable and can be rearranged as legos
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Currying is not pattern. It is function property. In all FP languages functions are like that, so they are curried.
If you have function f: a ->b->c then by applying only a we have function g: b->c.
In JS as it's not FP language we need to make currying manually by using closures and returning function from function. It doesn't violate any purity as it is exactly FP concept.
But has no value as far as I can tell.
If it would not have value it would not exists. It has huge value. But this answer would be worth a whole post about that ;)
maybe the second function would need a valued computed from the first function, so it could be use as a pipeline of computed values that are reusable and can be rearranged as legos