From fantasy-land
Functor¶ ↑
map :: Functor f => f a ~> (a -> b) -> f b
Apply¶ ↑
ap :: Apply f => f a ~> f (a -> b) -> f b
Applicative¶ ↑
of :: Applicative f => a -> f a
Array.of = x => [x] Either.of = x => Right(x) Function.of = x => _ => x Maybe.of = x => Just(x) Task.of = x => new Task((_, res) => res(x))
Chain¶ ↑
chain :: Chain m => m a ~> (a -> m b) -> m b
Comparison¶ ↑
Language | Library | Functor | Apply | Applicative | Chain | |
---|---|---|---|---|---|---|
Haskel | <$> | fmap | <*> | pure | >>= | |
JavaScript | ramda-fantasy | map | ap | of | chain | |
Ruby | map | flat_map | ||||
Ruby | dry-monads | fmap | pure | bind | ||
Ruby | kleisli | fmap | * | > | ||
Ruby | ramda-ruby | map | ap | chain |