Closed ocharles closed 9 years ago
The following program
module Main where import Control.Monad import Control.Concurrent import Control.FRPNow main :: IO () main = (print :: Double -> IO ()) =<< runNowMaster (do e <- async (threadDelay 10000) let clock = pure 0 `switch` (pure 1 <$ e) :: Behavior Double speed = 1 :: Double distance <- sample (integrate clock (pure speed)) traceChanges "Distance: " distance return never)
outputs
Distance: 0.0 Distance: 0.5
Given a speed of 1 unit/tick, I'd expect that after 1 tick I had travelled 1 units, rather than 0.5.
Thanks! Fixed in the next version.
The following program
outputs
Given a speed of 1 unit/tick, I'd expect that after 1 tick I had travelled 1 units, rather than 0.5.