prelude-ts icon indicating copy to clipboard operation
prelude-ts copied to clipboard

Function returned from Either::liftApAcc closes over leftErrs from the outer scope

Open flakey-bit opened this issue 2 years ago • 0 comments

Firstly, thanks for the great library 🙂

It appears that the function returned from Either::liftApAcc closes over leftErrs from the outer scope.

That effectively means the function returned from Either::liftApAcc is stateful and can't be used more than once.

NB: I noticed while applying your suggestion from https://github.com/emmanueltouzery/prelude-ts/issues/61.

flakey-bit avatar Sep 16 '22 03:09 flakey-bit