Skip to main content

Diagrams

Pictures of what the operators do. Each diagram shows the items entering an operator and the items leaving it.

Filter​

chain(["🐍", "🦔", "🐍", "🐍", "🦔"]).filter((i) => i === "🦔");

Map​

chain([1, 2, 3]).map((i) => i * 2);

Take​

chain(["🍎", "🍌", "🍇", "☕"]).take(2);

Skip​

chain(["🍎", "🍌", "🍇", "☕"]).skip(2);

Batch​

chain(["🍎", "🍎", "🍎", "🍎", "🍎"]).batch(2);

Interval​

chain(["🐦", "🦋", "🌻", "🐯", "🌍", "👋", "😁"]).interval(3);

Flatten​

chain([["🍎", "🍎"], ["🍎", "🍎"], ["🍎"]]).flatten();

Mux​

The interleaving below is only an example: the order across inputs is not defined, the order within each input is kept.

chain(
mux([
["🍎", "🍎", "🍎", "🍎", "🍎"],
["🐦", "🐦", "🐦", "🐦", "🐦"],
]),
);