Created
November 3, 2025 23:51
-
-
Save andradefil/02851752ba160c407c0f571461fbd5b2 to your computer and use it in GitHub Desktop.
example pipeline-async
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require '[clojure.core.async :as a]) | |
| (def from (a/chan 10)) | |
| (def to (a/chan 10)) | |
| (a/onto-chan!! from [1 2 3 4 5]) | |
| (a/<!! from) | |
| (a/pipeline-async 4 | |
| to | |
| (fn [i rc] | |
| (a/>!! rc (str "foo-" i)) | |
| (a/close! rc)) | |
| from) | |
| (a/<!! to) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment