| Copyright | (C) 2012 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.Machine.Mealy
Description
Documentation
Mealy machines
Examples
We can enumerate inputs:
>>>let countingMealy = unfoldMealy (\i x -> ((i, x), i + 1)) 0>>>run (auto countingMealy <~ source "word")[(0,'w'),(1,'o'),(2,'r'),(3,'d')]
Instances
unfoldMealy :: (s -> a -> (b, s)) -> s -> Mealy a b Source #
A Mealy machine modeled with explicit state.