Skip to content

Commit a97a59b

Browse files
committed
Avoid using default in comment
1 parent 47d634d commit a97a59b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ value is `Nothing` the default value is returned, otherwise the function
2525
is applied to the value inside the `Just` and the result is returned.
2626

2727
``` purescript
28-
maybe default f Nothing == default
29-
maybe default f (Just x) == f x
28+
maybe x f Nothing == x
29+
maybe x f (Just y) == f y
3030
```
3131

3232
#### `fromMaybe`
@@ -40,8 +40,8 @@ Takes a default value, and a `Maybe` value. If the `Maybe` value is
4040
`Just` is returned.
4141

4242
``` purescript
43-
fromMaybe default Nothing == default
44-
fromMaybe default (Just x) == x
43+
fromMaybe x Nothing == x
44+
fromMaybe x (Just y) == y
4545
```
4646

4747
#### `isJust`

src/Data/Maybe.purs

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ data Maybe a = Nothing | Just a
1616
-- | is applied to the value inside the `Just` and the result is returned.
1717
-- |
1818
-- | ``` purescript
19-
-- | maybe default f Nothing == default
20-
-- | maybe default f (Just x) == f x
19+
-- | maybe x f Nothing == x
20+
-- | maybe x f (Just y) == f y
2121
-- | ```
2222
maybe :: forall a b. b -> (a -> b) -> Maybe a -> b
2323
maybe b _ Nothing = b
@@ -28,8 +28,8 @@ maybe _ f (Just a) = f a
2828
-- | `Just` is returned.
2929
-- |
3030
-- | ``` purescript
31-
-- | fromMaybe default Nothing == default
32-
-- | fromMaybe default (Just x) == x
31+
-- | fromMaybe x Nothing == x
32+
-- | fromMaybe x (Just y) == y
3333
-- | ```
3434
fromMaybe :: forall a. a -> Maybe a -> a
3535
fromMaybe a = maybe a (id :: forall a. a -> a)

0 commit comments

Comments
 (0)