   "Chains a computation `f` (function) to be executed when the promise
   `p` is successfully resolved.
 
-  Unlike `then` this does not performs automatic promise flattening.
+  Unlike `then`, this does not perform automatic promise flattening.
   This is designed to be used with `->>`."
   ([f p]
    (pt/-map (pt/-promise p) f))


(defn mapcat
  "Chains a computation `f` (function) to be executed when the promise
  `p` is successfully resolved. always expecting that `f` returns a
  promise that will be automatically unwrapped.

  This is just a stricter version of `then` with reversed arguments in


(defn chain'
  "Chain variable number of computations to be executed serially. Unlike
  `chain` does not flatten the return value of each step (probably
  this is more performant than `chain`)."
  ([p f] (then' p f))
  ([p f & fs] (reduce pt/-map (pt/-promise p) (cons f fs))))
