emmanueltouzery / prelude-ts

Functional programming, immutable collections and FP constructs for typescript and javascript
ISC License
377 stars 21 forks source link

Extra functions for dealing with Future<Either> #54

Closed benjstephenson closed 2 years ago

benjstephenson commented 2 years ago

I appreciate that general monad transformers are out of scope for prelude-ts so I'm not sure of the appetite for this type of code, but I've found that in day to day use on projects I often end up combining Future and Either specifically so this is an extract of some project code that aimed to ease that use a little.

I think I've covered a good amount of test cases but the documentation isn't as complete as it should be at the moment, happy to fix that though.

Some inspiration taken from the Cats implementation of EitherT. Any feedback on naming etc would be great.

emmanueltouzery commented 2 years ago

sorry you're closing this. as you wrote i'm unsure on how this fits in prelude-ts and whether it should be included or a separate library. i'm trying to gather energy to properly review this and give useful feedback...

benjstephenson commented 2 years ago

I sort of stuffed up the change I wanted to offer with some other work I was playing around with so thought I should close it til I sorted my code out but I'll reopen once I've cleaned up. If there's anything I can do to make a review a bit easier etc please let me know; really appreciate the work you've put into this lib 👍