From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q3HIp4ka024758 for ; Tue, 17 Apr 2012 20:51:04 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmcCAEa6jU/Y5v4vmGdsb2JhbABEgxyrDoMTIgEBAQEBBgsNBxQnggkBAQQBJxFBBQsLDQsJFBEPAkYTAQcBAYgFBAG6GY1TgyQEiFqNFYVyIo0Y X-IronPort-AV: E=Sophos;i="4.75,436,1330902000"; d="scan'208";a="140561605" Received: from unknown (HELO amout07.alpha-mail.net) ([216.230.254.47]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Apr 2012 20:50:58 +0200 Received: from webarc05.alpha-mail.jp (webarc05 [216.230.254.85]) by amout07.alpha-mail.net with ESMTP id q3HIopmr008620; Wed, 18 Apr 2012 03:50:51 +0900 X-Virus-Scanned: amavisd-new at Alpha-Mail Out Received: from ltsub02.alpha-mail.net (ltsub02 [216.230.254.30]) by webarc05.alpha-mail.jp (Postfix) with ESMTP id C0141A48076; Wed, 18 Apr 2012 03:50:50 +0900 (JST) Received: from [192.168.1.4] (FL1-27-127-78-21.aic.mesh.ad.jp [27.127.78.21]) by ltsub02.alpha-mail.net (Alpha-mail) with ESMTP id 086307460045; Wed, 18 Apr 2012 03:50:50 +0900 (JST) Message-ID: <4F8DBB8E.10901@itpl.co.jp> Date: Wed, 18 Apr 2012 03:50:54 +0900 From: Satoshi Ogasawara User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: camaradetux@gmail.com CC: caml-list@inria.fr References: <4F8D9D0E.1040007@itpl.co.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] [ANN] PEC ver. 1.1 (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