From c88c088f22abd64101163980c334b9a4102d5f71 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 3 Feb 2021 09:32:16 -0500 Subject: Rename double-fmap operator and remove extra comments --- Alpha.hs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'Alpha.hs') diff --git a/Alpha.hs b/Alpha.hs index ffcaff7..697f096 100644 --- a/Alpha.hs +++ b/Alpha.hs @@ -39,7 +39,8 @@ module Alpha -- * Mapping (/>), (), -- * inding bind, @@ -98,33 +99,33 @@ compose f g x = g (f x) (.>) :: (a -> b) -> (b -> c) -> (a -> c) f .> g = compose f g --- infixl 0 .> - -- | Left-composition operator -- -- Pronunciation: gal-dot (<.) :: (b -> c) -> (a -> b) -> (a -> c) g <. f = compose f g --- infixr 0 <. - -- | Alias for map, fmap, <$> -- -- Pronunciation: gal-fas ( (a -> b) -> f a -> f b f (b -> a) -> f0 (f1 b) -> f0 (f1 a) +(<%) = fmap <. fmap -- | Double fmap. A function on the left goes "into" two functors -- (i.e. it goes "two levels deep"), applies the function to the inner -- values, then returns the result wrapped in the two functors. -- --- Pronunciation: gal-fas-fas -( (a -> b) -> f0 (f1 a) -> f0 (f1 b) -( fmap - --- infixr 1 ) :: (Functor f0, Functor f1) => (a -> b) -> f0 (f1 a) -> f0 (f1 b) +(%>) = fmap .> fmap -- | Normal function application. Do the right side, then pass the -- return value to the function on the left side. -- cgit v1.2.3