-
-
Save arturparkhisenko/0f094cd4d273e8c058a244fc0e00870c to your computer and use it in GitHub Desktop.
Composable utilities
This file contains 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