Crate operational [] [src]

The operational library makes it easy to implement monads with tricky control flow.

This is very useful for: writing web applications in a sequential style, programming games with a uniform interface for human and AI players and easy replay, implementing fast parser monads, designing monadic DSLs, etc.

A thorough introduction to the ideas behind this library is given in "The Operational Monad Tutorial", published in Issue 15 of the Monad.Reader.

Modules

instr

Contains the Instr trait, and a few useful utilities for working with instructions.

Macros

seq!

Provides a convient syntax for monadic computations.

Structs

Kleisli

The Kleisli arrow from A to Program<I, B>.

Enums

Program

Represents a program, i.e. a sequence of instructions.

Functions

lift

Lift an instruction into a program.

point

Using a value, constructs the empty program, i.e. a program that directly returns that value.