Skip to content

Instantly share code, notes, and snippets.

@arturparkhisenko
Forked from ericelliott/composables.js
Created September 6, 2016 06:31
Show Gist options
  • Save arturparkhisenko/0f094cd4d273e8c058a244fc0e00870c to your computer and use it in GitHub Desktop.
Save arturparkhisenko/0f094cd4d273e8c058a244fc0e00870c to your computer and use it in GitHub Desktop.
Composable utilities
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