Skip to content

Commit 400606c

Browse files
also add find to Appendix C
1 parent 7f46499 commit 400606c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

appendix_c.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In order to find functions that are more production-ready, have a peek at
1010

1111
Note that functions refer to the `curry` & `compose` functions defined in [Appendix A](./appendix_a.md)
1212

13-
## add
13+
## add
1414

1515
```js
1616
// add :: Number -> Number -> Number
@@ -52,14 +52,21 @@ const eq = curry((a, b) => a === b);
5252
const filter = curry((fn, xs) => xs.filter(fn));
5353
```
5454

55+
## find
56+
57+
```js
58+
// find :: (a -> Boolean) -> [a] -> a
59+
const find = curry((fn, list) => list.find(fn))
60+
```
61+
5562
## flip
5663

5764
```js
5865
// flip :: (a -> b -> c) -> b -> a -> c
5966
const flip = curry((fn, a, b) => fn(b, a));
6067
```
6168

62-
## forEach
69+
## forEach
6370

6471
```js
6572
// forEach :: (a -> ()) -> [a] -> ()
@@ -108,7 +115,7 @@ const map = curry((fn, f) => f.map(fn));
108115
const match = curry((re, str) => re.test(str));
109116
```
110117

111-
## prop
118+
## prop
112119

113120
```js
114121
// prop :: String -> Object -> a

0 commit comments

Comments
 (0)