
3 Nov
2012
3 Nov
'12
8:18 a.m.
Hey, With this netwire based program: {-# LANGUAGE Arrows #-} import Control.Wire import Data.List mainWire :: WireP () Double mainWire = proc _ -> do accum (+) 0 -< 1 main = do wireLoop mainWire wireLoop :: WireP () Double -> IO () wireLoop w' = do let (mx, w) = stepWireP w' 1.0 () case mx of Left x -> putStrLn $ show mx Right x -> putStrLn $ show mx wireLoop w I get (output): Right 0.0 Right 1.0 Right 2.0 ... Should the output not start with 1.0 (and not 0.0)? The accum should be applied already in the first invocation, should it not? Regards, Nathan