(2012/04/18 2:52), Adrien wrote:
I haven't been able to take more than a close look at PEC but I'm
interested in it (in particular for the ability to send values to
events during the update cycle).

Thank you for your interest in my library.

I've noticed EventSig.scan: val scan : ('a ->  'b ->  'a) ->  'a ->  'b t ->  
'a t
Is this function like a fold? Is there a particular reason for naming
it "scan" (rather than "fold")?

Because I thought Haskell's scanl is more similar to EventSig.scan than foldl.

scanl : (a -> b -> a) -> a -> [b] -> [a]
foldl : (a -> b -> a) -> a -> [b] -> a

BTW, I have just noticed Event.scan has a bug. The result of scan function 
should
 contain initial value specified second argument, but Event.scan doesn't.
That has been fixed.


Regards,
  Ogasawara

--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to