Skip to content

Instantly share code, notes, and snippets.

@dtipson
Created November 7, 2015 21:35
Show Gist options
  • Select an option

  • Save dtipson/4be0f4e730d03b16270e to your computer and use it in GitHub Desktop.

Select an option

Save dtipson/4be0f4e730d03b16270e to your computer and use it in GitHub Desktop.
Program in one line plus flatten
const program = (...list) =>
acc =>
R.flatten(list).reduce( (acc,fn) => acc.then(fn), Promise.resolve(acc));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment