Skip to content

Commit eceef75

Browse files
authored
Using equivalent operator for functor laws
...as opposed to threequals
1 parent 86d9603 commit eceef75

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

readme.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -313,16 +313,15 @@ john.age + five === ({name: 'John', age: 30}).age + (5)
313313

314314
An object that implements a `map` function which, while running over each value in the object to produce a new object, adheres to two rules:
315315

316-
```js
317-
// preserves identity
318-
object.map(x => x) === object
316+
### Preserves identity
317+
```
318+
object.map(x => x) object
319319
```
320320

321-
and
321+
### Composable
322322

323-
```js
324-
// composable
325-
object.map(x => f(g(x))) === object.map(g).map(f)
323+
```
324+
object.map(compose(f, g)) ≍ object.map(g).map(f)
326325
```
327326

328327
(`f`, `g` be arbitrary functions)

0 commit comments

Comments
 (0)