extracted a reusable generic scheduler with tests to Scheduler.elm
generic scheduler handles list of states using map; should really generalise to a state functor with an fmap
slightly losing it...