Difference between revisions of "Yampa/reactimate"

From HaskellWiki
Jump to navigation Jump to search
(New page: 768px (download original Yampa reactimate activity diagram.svg))
 
Line 1: Line 1:
  +
<source lang="Haskell">
[[Image:Yampa reactimate activity diagram.png‎|768px]]
 
  +
reactimate :: IO a -- init
(download original [[:Image:Yampa reactimate activity diagram.svg|Yampa reactimate activity diagram.svg]])
 
  +
-> (Bool -> IO (DTime, Maybe a)) -- input/sense
  +
-> (Bool -> b -> IO Bool) -- output/actuate
  +
-> SF a b -- process/signal function
  +
-> IO ()
  +
</source>
  +
  +
'reactimate' basically is an input-process-output loop. Keep in mind that the signal function may take pretty complex forms like a [[Yampa/Switches|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.)

Revision as of 09:51, 2 July 2011

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.)