index.js
function each (fn) {
  assert.equal(typeof fn, 'function')
  return function (arr) {
    arr = Array.isArray(arr) ? arr : [arr]

    return arr.reduce(function (prev, curr, i) {
      return prev.then(function () { return fn(curr, i, arr.length) })
    }, Promise.resolve()).then(function () { return arr })
  }
}
function each (fn) {
  assert.equal(typeof fn, 'function')
  return function (arr) {
    arr = Array.isArray(arr) ? arr : [arr]

    return arr.reduce(function (prev, curr, i) {
      return prev.then(function () { return fn(curr, i, arr.length) })
    }, Promise.resolve()).then(function () { return arr })
  }
}
apply a function to all values should only be used for side effects (fn) -> prom