Last active
June 24, 2017 12:55
-
-
Save dewey92/b392d740b094297b2528725f124c3315 to your computer and use it in GitHub Desktop.
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 getChild = person => Maybe(person.child) | |
| const getName = person => person.name | |
| const textPenghulu = curry((co, ce) => `Saya nikahkan ${co} dan ${ce}, sah!`) | |
| const jihad = getName(getChild(mnunirFam)) | |
| const pita = getName(getChild(wawanFam)) | |
| console.log(textPenghulu(jihad, pita) | |
| // Result: "Saya nikahkan undefined dan undefined, sah!" | |
| // Expected: "Saya nikahkan Jihad dan Puspita, sah!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment