Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

event-driven workflows for clojure

branch: master

This branch is 24 commits ahead and 406 commits behind perf

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 README.textile
Octocat-spinner-32 libs
Octocat-spinner-32 project.clj

Lamina provides an event-driven analogue to Clojure’s sequences, called channels. Similar mechanisms have been used in languages such as Go, JoCaml, and C#.

Channels are meant to be a generic interface for the creation and consumption of asynchronous events. Within Aleph, they are used to represent network communication over a variety of protocols.

Sequences can be turned into channels, and vice versa:

> (def ch (apply channel (range 3)))
<== [0 1 2]
> (channel-seq ch)
(0 1 2)

Channels can be altered using familiar operators:

> (channel 1 2 3)
<== [1 2 3]
> (map* inc *1)
<== [2 3 4]
> (filter* even? *1)
<== [2 4]

Channels can be connected to each other, like UNIX pipes:

> (def a (channel))
<== []
> (def b (channel))
<== []
> (siphon (map* inc a) b)
> (enqueue a 1)
> b
<== [2]

To learn more, read the wiki. Complete documentation can be found here.

Something went wrong with that request. Please try again.