Created
April 14, 2020 17:37
-
-
Save UserGalileo/9fcb05a9c79f45d970a70f39de93b626 to your computer and use it in GitHub Desktop.
Monoid falling into the same set
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 f = x => Identity(x + 1); // a -> M a | |
const g = x => Identity(x + 2); // a -> M a | |
const h = x => Identity(x + 3); // a -> M a | |
const f_g = op(f,g); // a -> M a | |
// We call it with an "a", we get back a "M a" | |
const Ma = f_g('whatever'); | |
// Identity(whatever12) | |
inspect(Ma); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment