Yampa/reactimate

From HaskellWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
reactimate :: IO a                          -- init
           -> (Bool -> IO (DTime, Maybe a)) -- input/sense
           -> (Bool -> b -> IO Bool)        -- output/actuate
           -> SF a b                        -- process/signal function
           -> IO ()

'reactimate' basically is an input-process-output loop. Keep in mind that the signal function may take pretty complex forms like a parallel switch embedded in a loop.

(The 'Bool' parameter of 'input' and 'output' are unused if you look up the definition of reactimate so just ignore them.)