Copyright | (c) Ivan Perez and Manuel Baerenz 2016 |
---|---|
License | BSD3 |
Maintainer | ivan.perez@keera.co.uk |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
MSF
s with a list monadic layer.
This module contains functions to work with MSFs that include a ListT
monadic layer. MSFs on a list monad may produce multiple outputs and
continuations, or none. This enables the possibility for spawning new MSFs,
or stopping MSFs, at will.
A common use case is to be able to dynamically spawn new interactive elements in applications (e.g., a game object that splits in two, or that fires to an enemy).
Documentation
widthFirst :: (Functor m, Monad m) => MSF (ListT m) a b -> MSF m a [b] Source #
Run an MSF
in the ListT
transformer (i.e., multiple MSFs producing
each producing one output), by applying the input stream to each MSF in the
list transformer and concatenating the outputs of the MSFs together.
An MSF in the ListT transformer can spawn into more than one MSF, or none, so the outputs produced at each individual step are not guaranteed to all have the same length.
module List.Transformer