burrido
burrido copied to clipboard
Typescript definitions
Not an issue per se, I was trying to do the same proof of concept as you did, but for TypeScript.
Wondering how could the generators work so well for Promises (async/await in TS transpiles into generators), but not for any object that has map/flatmap methods. So I encountered the need for cloneable generators, and when googled it, found your project!
Have you ever tried to check if this could work with types?
Hi Lukiano, since monads require abstracting over type constructors I don't believe this library can be typed in a straightforward way until TypeScript gets support for higher-kinded types; see this issue. However it might be possible to do using this technique. I'd welcome a pull request if you'd like to give it a try!