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
typeEither<L,R>=Left<L,R>|Right<L,R>typeMaybe<T>=Just<T>|None<T>;// <T> may be obsolete, cause of T = never by default
It's more efficient. Now left and right are different on class level, so difference is expressed through prototype without specific property, so overhead is minimal
2. Make None a singleton
Continuing with classes, it is possible to create one and only one None for all program
Hi @AlexXanderGrib.
Thank you for the proposal, it looks great.
I want to know a little bit more about the use cases of each bullet because it's hard to understand, why people should have an iterator for Maybe or Either.
Could you describe a few use cases inside each paragraph?
Hello, while @JSMonk was away this spring i created my fork of this library. Here it is https://github.com/AlexXanderGrib/monads-io
And here some good ideas you can grab from it:
1. Use inheritance
It's simpler. Types can now be defined as:
It's more efficient. Now left and right are different on class level, so difference is expressed through prototype without specific property, so overhead is minimal
2. Make
None
a singletonContinuing with classes, it is possible to create one and only one None for all program
3. Create rust-like iterator helpers
4. Add
await
method for async monads5. Add
zip
methodCan be used to refactor
.apply()
The text was updated successfully, but these errors were encountered: