(defn then [promise-ch f] (let [out (async/promise-chan)] (async/pipeline-async 1 out #(async/pipe (f %1) %2) promise-ch) out))