{- State should be independent of time and not recorded
-- so every recorded frame should be enough to reconstruct the universe without it
-- state stores stuff like the currently focused cell
-- it does not provide information about the universe
-- State can however influence the universe
-- as is the case for the random seed or user input
-}
-- a cell is defined by its behaviour
newtype Automata state a = Automata (Atom a => state -> Map Dir a -> a -> a)
Automata g <> Automata f = Automata (\s ns -> g s ns . f s ns)
mempty = Automata (\_ _ -> id)
step . f