Skip to content

runarorama/scala-machines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ee3e0ec · Sep 29, 2016
Sep 29, 2016
Jul 11, 2015
Aug 18, 2012
Sep 29, 2016
Jul 30, 2013
Jul 31, 2013
Sep 29, 2016
Aug 17, 2012

Repository files navigation

Machines

Machines are demand-driven coroutines. They are similar to Pipes, Conduits, or Iteratees, but can support inputs of arbitrary complexity and are entirely pure. Instead of having monadic effects of its own, a Machine can be driven by a Driver which can have effects when feeding the Machine input or when reading its output.

You design a Machine by writing a Plan. You then compile the machine if it is to run once to completion, or designate it to run repeatedly. Plan provides a monadic API for building machines, but Machines themselves do not form a monad.

Simple machines that read from one input source are called a Process and processes form a Category. More generally you can attach a Process to the output of any type of Machine, yielding a new Machine.

More complicated machines provide other ways of connecting to them.

Binary packages available at https://bintray.com/runarorama/maven/machines