Q&A: coming from Ramda or fp-ts? #14
Unanswered
roxdavirox
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
If you are migrating from Ramda, fp-ts, or lodash/fp, ask your questions here.
Common mappings
From Ramda
R.pipe(f, g)(x)pipe(x, f, g)R.compose(f, g)compose(f, g)R.map(fn, list)map(fn)(list)R.filter(pred, list)filter(pred)(list)R.groupBy(fn, list)groupBy(fn)(list)R.either(f, g)or(f, g)(predicates)R.both(f, g)and(f, g)(predicates)R.memoizeWithmemoize(fn, keyFn)From fp-ts
Either<E, A>Result<T, E>Option<A>Option<T>right(a)Ok(a)left(e)Err(e)some(a)Some(a)noneNonepipe(x, E.map(f))pipe(x, mapResult(f))pipe(x, E.chain(f))pipe(x, flatMap(f))Key differences
pipe(value, fn1, fn2)notpipe(fn1, fn2)(value)Kind<F, A>flatMapnotchain,matchnotfoldPost your questions below.
All reactions