git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Factor out backwards composition from Category
commit9a980955143d641edf0e0dac4c1d1faf25ab3199 authorPhil Freeman <paf31@cantab.net> dateTue 11 Mar 2014, 11:20 (13 years ago) parent8f888f3
1 file changed+3−2
prelude/prelude.purs+3−2
prelude/prelude.purs+3−2
@@ -12,12 +12,13 @@ module Prelude where
1212 class Category a where
1313 id :: forall t. a t t
1414 (<<<) :: forall b c d. a c d -> a b c -> a b d
15− (>>>) :: forall b c d. a b c -> a c d -> a b d
15+
16+ (>>>) :: forall a b c d. (Category a) => a b c -> a c d -> a b d
17+ (>>>) f g = g <<< f
1618
1719 instance categoryArr :: Category (->) where
1820 id x = x
1921 (<<<) f g x = f (g x)
20− (>>>) f g x = g (f x)
2122
2223 infixr 0 $
2324 infixl 0 #