Project

fmm

0.0
No commit activity in last 3 years
No release in over 3 years
FMM is a small finite state machine implementation based on Michael Martens' micromachine, but recast in the idioms of functional programming: instead of mutable state we use arguments and return values, and instead of methods bound to an instance of a class like MicroMachine, we provide utility functions that operate on any suitable data structure.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 0
 Project Readme

FMM

FMM is short for "functional micromachines;" it is based on the micromachine gem, a nicely compact little finite state machine implementation.

Micromachine is an imperative design, based on the methods and mutable state of an instance of class MicroMachine. FMM takes a functional approach, where (a) the state machine operations are pure functions that take the current state as an argument and return an updated state, and (b) instead of building the machine imperatively by calls to machine.on(...), we assume the machine is given as a data structure of a certain format. (A validation method is included.)

Updates soon. In the meantime, have a look at the test suite.