Skip to content

Instantly share code, notes, and snippets.

@ipassynk
Created August 22, 2016 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipassynk/bfafcf799f568056f838ee45543167bc to your computer and use it in GitHub Desktop.
Save ipassynk/bfafcf799f568056f838ee45543167bc to your computer and use it in GitHub Desktop.
//var madd3 = R.lift(R.curry((a, b, c) => a + b + c));
//madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
// the same written with flatMap and map
let res = _.flatMap([1,2,3], x => _.flatMap([1,2,3], y => _.map([1], z => x+y+z)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment