Skip to content

Commit 74cd8d5

Browse files
committed
Update Functor docs to use map
Now that the type class defines `map` and not `<$>`, this makes more sense. It also fixes a problem where the previous docs used the old operator section syntax, which was removed a while ago.
1 parent 2565615 commit 74cd8d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Data/Functor.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ import Data.Function (const, compose)
1111
import Data.Unit (Unit, unit)
1212

1313
-- | A `Functor` is a type constructor which supports a mapping operation
14-
-- | `(<$>)`.
14+
-- | `map`.
1515
-- |
16-
-- | `(<$>)` can be used to turn functions `a -> b` into functions
16+
-- | `map` can be used to turn functions `a -> b` into functions
1717
-- | `f a -> f b` whose argument and return types use the type constructor `f`
1818
-- | to represent some computational context.
1919
-- |
2020
-- | Instances must satisfy the following laws:
2121
-- |
22-
-- | - Identity: `(<$>) id = id`
23-
-- | - Composition: `(<$>) (f <<< g) = (f <$>) <<< (g <$>)`
22+
-- | - Identity: `map id = id`
23+
-- | - Composition: `map (f <<< g) = map f <<< map g`
2424
class Functor f where
2525
map :: forall a b. (a -> b) -> f a -> f b
2626

0 commit comments

Comments
 (0)