-- combine :: [a -> ([b], a)] -> [b] -> a -> ([b], a)
-- combine fs bs a = foldl (\(bs, a) f -> let (bs', a') = f a in (bs ++ bs', a')) (bs, a) fs

-- eventS :: Signal [a] -> EventS [a]
-- eventS = fmap f
--     where
--         f [] -> Nothing
--         f as -> Just as
-- 
-- regionS :: Signal ([Input], State) -> Signal ([Output], Maybe (RegionMap -> RegionMap))
-- regionS s =
--     let (inputs, state) = unzipS
--         events = eventS inputs
--         f (is, s) = 
--     in fmap f (events `snapshot` state)

tick :: Time -> State -> State
tick dt s = s { time = time s + dt }
tick :: Time -> State -> State
tick dt s = s { time = time s + dt }
tick dt s = s { time = time s + dt }