Functional State Theory
Overview
The functional state framework is a simplified framework for creating dynamic web sites using a functional approach
that fully embraces state.
Finite State Machine
The best definition of state comes from considering what is known as a finite state machine. The machine can exist in
any number states (which represents in some sense, stored data), and there are transitions that can occur between states.
Consider a vending machine. It accepts coins, and when enough coins have been inserted, it returns a soda and some change.
Lets assume that the soda costs 50 cents. The state of the machine represets the amount of money already deposited.
For example, if a person inserts a quarter, the vending machine state goes from 0 to 25. Then if they insert a dime, the
machine transitions to the state 35. Once the state reaches 50, a soda is dispensed and the state transitions back to 0.
Lambda Calculus
Functional programming had its beginning with the invention of the lambda calculus.