ddc-code-0.4.3.1: tetra/base/Class/Functor.ds
module Class.Functor
export fmap
where
-- | Class of collection types that can be mapped over.
data Functor (f: Data -> Data) where
Functor
: ([a b: Data]. (a -> b) -> f a -> f b) -- fmap
-> Functor f
-- | Apply a function to values of type 'a' in the input collection.
fmap : [f: Data -> Data]. [a b: Data]
. Functor f -> (a -> b) -> f a -> f b
fmap (Functor fmap') = fmap'