Re:Haskell RecordDotSyntax language extension proposal (Acce...
by sudomakeup on Monday September 21, 2020 @01:34PM
(#24546157)
You can do left to right function composition with (>>>)
Given functions f, g , h,
h >>> g >>> f is equivalent to f . g . h
Its from Control.Category, so it generalizes to other things, but for functions specifically its left to right composition.
( theres also (<<<), which in this case is identical to (.) )
( Also present in Control.Arrow . Why? I dont know this topic well enough to explain. My understanding is limited to what these operators mean in the specific of functions. Functions(->) are a type as well, so they can be instances of typeclasses. for example
Given functions f, g , h,
h >>> g >>> f is equivalent to f . g . h
Its from Control.Category, so it generalizes to other things, but for functions specifically its left to right composition.
( theres also (<<<), which in this case is identical to (.) )
( Also present in Control.Arrow . Why? I dont know this topic well enough to explain. My understanding is limited to what these operators mean in the specific of functions. Functions(->) are a type as well, so they can be instances of typeclasses. for example