Data.Functor

lib/Data/Functor.gob

No module comment.

class Functor f
fun map : [Functor f] fun(f a, fun(a) -> b) -> f b
fun fmap : [Functor f] fun(fun(a) -> b, f a) -> f b

Returns map(xs, g): the same function, with the function first.

infix Sequence (<&>) = Functor.map -- left-associative

Both are in Sequence, which is left-associative, so a chain of maps is written container first: xs <&> f <&> g. The same chain with <$>, g <$> f <$> xs, groups as (g <$> f) <$> xs and is a type error.

infix Sequence (<$>) = fmap -- left-associative