Created
April 4, 2019 00:49
-
-
Save dewey92/c6832c5a3f0e87f4b56575beae6ae9e0 to your computer and use it in GitHub Desktop.
Num Mult Monoid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const numMult = createMonoid({ | |
| indentity: 1, | |
| semigroup: (a, b) => a * b, | |
| }); | |
| log(numMult.id) // => 1 | |
| log(numMult.append(1, 999)) // => 999 | |
| log(numMult.append(999, numMult.id)) // => 999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment