asystant.pipe

Helper functions for creating pipe functions.

A pipe function is a function of the form: (fn [in-ch out-ch]
                                             shutdown-callback)
where the shutdown-callback is an optional 0-arg function that will
be called when shutting down. If the connections made in the pipe function
will be naturally closed when the in-ch closes, this is unnecessary.

The purpose is to provide a flexible way of defining how to connect modules and
these helpers allow you to perform simple connections without needing to worry about
the details of core.async

sink

(sink f)
Create a pipe-function from a function that takes items and has no meaningful return value

sink-ch

(sink-ch ch)
Create a pipe-function from a channel that should act as a sink

source

(source f)
Create a pipe-function from a function that takes a function that takes an item
and has no meaningful return value

source-ch

(source-ch src-ch)
Create a pipe-function from a channel that should act as a source

transform

(transform xf)
Create a pipe-function that applies an x-form to items