From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 97FEF7F30A for ; Fri, 8 Mar 2013 12:52:16 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of lukstafi@gmail.com) identity=pra; client-ip=209.85.128.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of lukstafi@gmail.com designates 209.85.128.173 as permitted sender) identity=mailfrom; client-ip=209.85.128.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ve0-f173.google.com) identity=helo; client-ip=209.85.128.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="postmaster@mail-ve0-f173.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUBABbQOVHRVYCtkGdsb2JhbABDxE2BUQgWDgEBAQEJCRQUKIIsAQEEAScZARsdAQMBCwYFBAEGOyEBAREBBQEcBhOIAAEDCQadGYwygnuEXQoZJw1ZiE8BBQyMOIJIB4NAA5MHgWSBYItZgzYWKYQt X-IPAS-Result: AtUBABbQOVHRVYCtkGdsb2JhbABDxE2BUQgWDgEBAQEJCRQUKIIsAQEEAScZARsdAQMBCwYFBAEGOyEBAREBBQEcBhOIAAEDCQadGYwygnuEXQoZJw1ZiE8BBQyMOIJIB4NAA5MHgWSBYItZgzYWKYQt X-IronPort-AV: E=Sophos;i="4.84,807,1355094000"; d="scan'208";a="6097302" Received: from mail-ve0-f173.google.com ([209.85.128.173]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Mar 2013 12:52:16 +0100 Received: by mail-ve0-f173.google.com with SMTP id oz10so1172885veb.4 for ; Fri, 08 Mar 2013 03:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=mGSkbPiTnNHfi1BAPMfq2LwHyzmWt4weJZCxAGdZtc8=; b=GBe3GnnOqIgSmS1lJ87aX98B4XnDqpptokQJQnjbFvBDDqzGrNYFnMrtUTMoBKpck6 i9/zxXHLeYSKfe4OLPCiSbC4fUg0zCdJCZr8cUtdjQtnLSZERFN0XlUKlS+cqCnlqzY0 juqkYoWwFZkRlqS/wP4wBj0/uMU5cNU1zAeat3D8f30D6tRh53eQMnJndGSA8XXjb49P wKl2OVSR4WR3/rQWggRN7QH/GsQyXRYQIEmuKh0Slm+WzzbIh/u/WXrJhcIgt9G8iGnJ MuhadLbPs504qNbZC3gdOGwbSzlmsB7KfFlEyesY515211Y3f9KZk5x30Jch4Db+xScd yKcQ== X-Received: by 10.220.241.19 with SMTP id lc19mr766886vcb.43.1362743535126; Fri, 08 Mar 2013 03:52:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.246.9 with HTTP; Fri, 8 Mar 2013 03:51:55 -0800 (PST) In-Reply-To: References: From: Lukasz Stafiniak Date: Fri, 8 Mar 2013 12:51:55 +0100 Message-ID: To: Philippe Veber Cc: caml users Content-Type: multipart/alternative; boundary=14dae9cfcbe65500a704d76874e0 Subject: Re: [Caml-list] Signals of signals in react --14dae9cfcbe65500a704d76874e0 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Mar 8, 2013 at 10:43 AM, Philippe Veber wrote: > Dear functional-reactive camlers, > > In order to change the dependencies between signals dynamically, one can > use the switch function whose type is: > > utop $ React.S.switch;; > - : ?eq:('a -> 'a -> bool) -> 'a React.signal -> 'a React.signal > React.event -> 'a React.signal = > > However I often find myself wanting to write signals of signals, and I > wrote the following definition to cope with them: > > val bind_s : 'a React.signal -> ('a -> 'b React.signal) -> 'b "Bind" is the basic building block of the Froc library: val bind : ?eq:('a -> 'a -> bool) -> 'b Froc.behavior -> ('b -> 'a Froc.behavior) -> 'a Froc.behavior I know I'm not answering your question... --14dae9cfcbe65500a704d76874e0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Fri, Mar 8, 2013 at 10:43 AM, Philippe Veber &= lt;philippe.v= eber@gmail.com> wrote:
Dear functional-reactive camlers,

In order to chang= e the dependencies between signals dynamically, one can use the switch func= tion whose type is:

utop $ React.S.switch;;
- : ?eq:('a -> 'a -> bool) -&g= t; 'a React.signal -> 'a React.signal React.event -> 'a R= eact.signal =3D <fun>

However I often find myself wanting to write signals of signals, and I = wrote the following definition to cope with them:

val bind_s : 'a React.signal = -> ('a -> 'b React.signal) -> 'b

"Bind" is the basic building block of t= he Froc library:

val bind :
= =A0 ?eq:('a -> 'a -> bool) ->
=A0 'b Froc.be= havior ->
=A0 ('b -> 'a Froc.behavior) -> 'a Froc.behavior

=A0I know I'm not answering your ques= tion...
--14dae9cfcbe65500a704d76874e0--