From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B258ABC6B for ; Wed, 10 Oct 2007 17:00:14 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFeFDEfLENaMn2dsb2JhbACOSAIBAQcEBgkIGA X-IronPort-AV: E=Sophos;i="4.21,255,1188770400"; d="scan'208";a="17804217" Received: from ipmail01.adl2.internode.on.net ([203.16.214.140]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Oct 2007 17:00:13 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFeFDEd5LCRs/2dsb2JhbAAM X-IronPort-AV: E=Sophos;i="4.21,255,1188743400"; d="scan'208";a="207811388" Received: from ppp121-44-36-108.lns10.syd7.internode.on.net (HELO [192.168.1.201]) ([121.44.36.108]) by ipmail01.adl2.internode.on.net with ESMTP; 11 Oct 2007 00:30:10 +0930 Subject: Re: [Caml-list] Functional design for a basic simulation pipe. From: skaller To: Hugo Ferreira Cc: caml-list@yquem.inria.fr In-Reply-To: <470CA488.1070804@inescporto.pt> References: <470C8199.4080708@inescporto.pt> <1192005274.6285.4.camel@rosella.wigram> <470CA488.1070804@inescporto.pt> Content-Type: text/plain Date: Thu, 11 Oct 2007 01:00:08 +1000 Message-Id: <1192028408.6198.31.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; 0100,:01 slave:98 sourceforge:01 wrote:01 invert:01 caml-list:01 functions:01 termination:01 data:02 data:02 argument:02 exp:02 functional:02 let:03 outputs:04 On Wed, 2007-10-10 at 11:08 +0100, Hugo Ferreira wrote: > Hello, > > Apologies for being so obtuse but I cannot to see how this solves my > problem. > let exp = a |> b |> c > > a: requires the input of a state and outputs an event > b: requires input of a state and the event generated at that state and > outputs processed data > c: consumes n number elements of processed data and stops when it > requires no more such data > Note that "c" will "pull in" for example 10 states and check for > termination, "b" will therefore need "pull in" 10 events. Functions cannot do that. You have to control invert. A function is a slave, it is *called* with its argument. you cant *read* the arguments. -- John Skaller Felix, successor to C++: http://felix.sf.net