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=1.0 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 71B5FBC6B for ; Thu, 28 Jun 2007 21:40:37 +0200 (CEST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l5SJea4u023655 for ; Thu, 28 Jun 2007 21:40:37 +0200 Received: (qmail invoked by alias); 28 Jun 2007 19:40:36 -0000 Received: from dialin-145-254-249-050.pools.arcor-ip.net (EHLO dialin-145-254-249-050.pools.arcor-ip.net) [145.254.249.50] by mail.gmx.net (mp028) with SMTP; 28 Jun 2007 21:40:36 +0200 X-Authenticated: #11134691 X-Provags-ID: V01U2FsdGVkX18SG9teI70Sq0ElSIDQfyE6EGkv/zURAVSqzvKgHs sowXOLlXERq2Y1 Received: from dirk by feanor.private-host.de with local (masqmail 0.2.20) id 1I3xfR-1ll-00 for ; Thu, 28 Jun 2007 19:20:29 +0200 Date: Thu, 28 Jun 2007 19:20:29 +0200 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] The Implicit Accumulator: a design pattern using optional arguments Message-ID: <20070628172029.GA6796@feanor> References: <200706271314.35134.jon@ffconsultancy.com> <85519A86-E765-4C3A-B292-2F9B150913AC@lrde.epita.fr> <46839DD8.7040200@functionality.de> <200706281544.36719.jon@ffconsultancy.com> <4683DBCD.9020509@functionality.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4683DBCD.9020509@functionality.de> User-Agent: Mutt/1.5.6+20040523i From: Dirk Thierbach X-Y-GMX-Trusted: 0 X-Miltered: at discorde with ID 46840EB4.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0100,:01 stack:01 stack:01 threading:01 28,:98 wrote:01 wrote:01 caml-list:01 functions:01 functions:01 precisely:01 awkward:02 argument:02 implicit:03 pattern:04 On Thu, Jun 28, 2007 at 05:03:25PM +0100, Thomas Fischbacher wrote: > Jon Harrop wrote: > >Pass the stack as an argument to those functions that need it. > Precisely this is how you would have to do this with ML. But then, if > you do not just deal with one stack, but have more complicated context, > OR if you have to start thinking about threading the stack through > functions that do not use it, but use other functions which use it, > things easily get quite awkward. So could one "hide the plumbing" in a monad? - Dirk