You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use your implementation of Fn monoid to concat some functions but it keeps throwing me an error saying concat is not a function...
constFn=f=>({fold: f,concat: o=>Fn(x=>f(x).concat(o.fold(x))),inspect: ()=>`Fn(${f})`})constfn=Fn(x=>x+1)console.log(fn.concat(Fn(x=>x-1)).fold(3).inspect())//TypeError: f(...).concat is not a function
i understand that f(x) does not have the concat method because f is not wrapped inside Fn on this context, but what am getting wrong... is this a bug or i am not using it propperly?
The text was updated successfully, but these errors were encountered:
I'm trying to use your implementation of Fn monoid to concat some functions but it keeps throwing me an error saying concat is not a function...
i understand that f(x) does not have the concat method because f is not wrapped inside Fn on this context, but what am getting wrong... is this a bug or i am not using it propperly?
The text was updated successfully, but these errors were encountered: