Skip to content

Instantly share code, notes, and snippets.

@andradefil
Created November 3, 2025 23:51
Show Gist options
  • Select an option

  • Save andradefil/02851752ba160c407c0f571461fbd5b2 to your computer and use it in GitHub Desktop.

Select an option

Save andradefil/02851752ba160c407c0f571461fbd5b2 to your computer and use it in GitHub Desktop.
example pipeline-async
(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