Javascript library for creating state machine's by way of monadic composition - AKA The error monad comes to javascript