I just noticed that the pipeline
family returns a channel
which seemingly operates completely independently of the purpose of the pipeline and it's related channels.
Notice in the following example you can >! / <!
from pipes
and a> / b>
separately, and they're unrelated.
As far as I understand, pipeline
s should be a no-op, and return nil
while setting up the sideffecting transduc
tion from a>
to b>
.
So, what am I missing, and why does pipeline
return a channel
?
(def a> (chan))
(def b> (chan))
(def pipes (pipeline-blocking 4
b>
(map clojure.string/upper-case)
a>))
(go (>! pipes "hello world"))
(go (println "Pipes: " (<! pipes)))
(go (>! a> "apples are gooood"))
(go (println "B: " (<! b>)))