Created
September 5, 2016 23:42
-
-
Save ericelliott/00d32233e855ef1903ba6a50b7d191d5 to your computer and use it in GitHub Desktop.
Composable utilities
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 curry = fn => (...args) => fn.bind(null, ...args); | |
const map = curry((fn, arr) => arr.map(fn)); | |
const join = curry((str, arr) => arr.join(str)); | |
const toLowerCase = str => str.toLowerCase(); | |
const split = curry((splitOn, str) => str.split(splitOn)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tasty