-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
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
Add map2, map3, map4 to Apply? #322
Comments
I'm using specialized version of sequence (specialized to array as traversable): export function combine<A>(a: Option<A>): Option<[A]>;
export function combine<A, B>(a: Option<A>, b: Option<B>): Option<[A, B]>;
export function combine<A, B, C>(a: Option<A>, b: Option<B>, c: Option<C>): Option<[A, B, C]>;
export function combine<A, B, C, D>(a: Option<A>, b: Option<B>, c: Option<C>, d: Option<D>): Option<[A, B, C, D]>;
export function combine<T>(...list: Option<T>[]): Option<T[]> {
return sequence(option, array)(list);
}
const foo = combine(some(1), some(2)).map(([a, b]) => a + b); Applicative (option) can be generalized though. |
Hey, I'm new in the open-source world and I'm trying to find a projet where I can help. Is this feature still needed ? |
Hi @volrk , and sorry for the late reply. As of now we have |
What I do now
versus
The text was updated successfully, but these errors were encountered: