From fantasy-land
map :: Functor f => f a ~> (a -> b) -> f b
ap :: Apply f => f a ~> f (a -> b) -> f b
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 m => m a ~> (a -> m b) -> m b
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 |