     return outCallback null, output... if fns.length is 0 
     runChain fns, output, outCallback 
  
+
+
+runReduce = (data, fn, memo, outCallback)->
+  # debug 'runReduce', arguments
+  return outCallback null, memo if data.length is 0
+  [head, others...] = data
+  fn memo, head, (err, newMemo)->
+    return outCallback err if err
+    runReduce others, fn, newMemo, outCallback
+
+runSerise = (data, fn, results, outCallback)->
+  # debug 'runSerise', arguments
+  return outCallback null, results if data.length is 0
+  [head, others...] = data
+  fn memo, head, (err, output)->
+    return outCallback err if err
+    results.push output
+    runSerise others, fn, results, outCallback
+
+_serise = (fn)->
+  return (data, outCallback)-> 
+    runSerise data, fn, [], outCallback
 
 _map = (fn)->
   return (data, outCallback)->

      joinAsyncFns fns, (err, results)-> 
        outCallback err, result
   

runReduce = (data, fn, memo, outCallback)->
  debug 'runReduce', arguments
  return outCallback null, memo if data.length is 0
  [head, others...] = data
  fn memo, head, (err, newMemo)->
    return outCallback err if err
    runReduce others, fn, newMemo, outCallback
      
_reduce = (memo, fn)->
  return (data, outCallback)->




 
flyway = (hands)-> return _flow(hands)

flyway.fn = {}
flyway.makeFn = {}

# flyway.mk = 
  # retry: _retry
  # map : _map
flyway.flow = _flow
# flyway.fnForkJoin = fnForkJoin
flyway.chain = _chain
# flyway.compose = _compose
flyway.map = _map
flyway.each = _map

flyway.reduce = _reduce

flyway.retry = _retry
flyway.serise = _serise

module.exports = exports = flyway