git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #936 from hdgarrood/fix-functor-laws
2693c58Gary Burgess
prelude/README.md+1−1
@@ -243,7 +243,7 @@ types use the type constructor `f` to represent some computational context.
243`Functor` instances should satisfy the following laws:
243`Functor` instances should satisfy the following laws:
244
244
245- Identity: `(<$>) id = id`
245- Identity: `(<$>) id = id`
246−- Composition: `(<$>) (f <<< g) = (<$> f) <<< (<$> g)`
246+- Composition: `(<$>) (f <<< g) = (f <$>) <<< (g <$>)`
247
247
248
248
249#### `(<#>)`
249#### `(<#>)`
prelude/prelude.purs+1−1
@@ -229,7 +229,7 @@ module Prelude
229 -- | `Functor` instances should satisfy the following laws:
229 -- | `Functor` instances should satisfy the following laws:
230 -- |
230 -- |
231 -- | - Identity: `(<$>) id = id`
231 -- | - Identity: `(<$>) id = id`
232− -- | - Composition: `(<$>) (f <<< g) = (<$> f) <<< (<$> g)`
232+ -- | - Composition: `(<$>) (f <<< g) = (f <$>) <<< (g <$>)`
233 -- |
233 -- |
234 class Functor f where
234 class Functor f where
235 (<$>) :: forall a b. (a -> b) -> f a -> f b
235 (<$>) :: forall a b. (a -> b) -> f a -> f b