We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Great library! It'd be even more useful if it supported Haskell's Either type.
Either
The text was updated successfully, but these errors were encountered:
Thanks! When I started the work of supporting generics I explicitly made the syntax compatible with 2 generic arguments.
// here what I envisioned const Either = Union((a, b) => ({ Right: of(a), Left: of(b) }))
But at the time I didn't need it enough to justify the type mess this would cause.
But I did have an idea how to make the result type useful: https://github.com/twop/ts-definitely-maybe/blob/master/src/result.ts
result
The gist of it is to bake one type argument at a time. Which is probably ok for result but less so for either.
either
Hope that helps + I'm open to discuss this more.
Sorry, something went wrong.
No branches or pull requests
Great library! It'd be even more useful if it supported Haskell's
Either
type.The text was updated successfully, but these errors were encountered: