Merge pull request #936 from hdgarrood/fix-functor-laws
Fix functor law in prelude documentation
commit2693c582ec9bf178a4cd6ed317ae2f1a37bea63d
authorGary Burgess <gary.burgess@gmail.com>
dateTue 3 Mar 2015, 11:32 (12 years ago)
parent7d49442e238362
prelude/README.md+1−1
@@ -243,7 +243,7 @@ types use the type constructor `f` to represent some computational context.
243243`Functor` instances should satisfy the following laws:
244244
245245- Identity: `(<$>) id = id`
246−- Composition: `(<$>) (f <<< g) = (<$> f) <<< (<$> g)`
246+- Composition: `(<$>) (f <<< g) = (f <$>) <<< (g <$>)`
247247
248248
249249#### `(<#>)`
prelude/prelude.purs+1−1
@@ -229,7 +229,7 @@ module Prelude
229229 -- | `Functor` instances should satisfy the following laws:
230230 -- |
231231 -- | - Identity: `(<$>) id = id`
232− -- | - Composition: `(<$>) (f <<< g) = (<$> f) <<< (<$> g)`
232+ -- | - Composition: `(<$>) (f <<< g) = (f <$>) <<< (g <$>)`
233233 -- |
234234 class Functor f where
235235 (<$>) :: forall a b. (a -> b) -> f a -> f b