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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 15DB3BC6C for ; Fri, 29 Jun 2007 00:12:39 +0200 (CEST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5SMCcuK016861 for ; Fri, 29 Jun 2007 00:12:38 +0200 Received: from [141.84.136.30] (helo=[86.135.154.146]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis), id 0ML2xA-1I42E926WJ-0003qc; Fri, 29 Jun 2007 00:12:37 +0200 Message-ID: <46843252.60608@functionality.de> Date: Thu, 28 Jun 2007 23:12:34 +0100 From: Thomas Fischbacher User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060904 Debian/1.7.8-1sarge7.2.2 X-Accept-Language: en MIME-Version: 1.0 To: Dirk Thierbach Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] The Implicit Accumulator: a design pattern using optional arguments 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> <20070628172029.GA6796@feanor> In-Reply-To: <20070628172029.GA6796@feanor> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/KxE9JzKH3+cRUcBhhsQJ7kXaTLT0o/0m/EU2 eDGHLC+SNw0cpG5tIjcg8KS8yN39iPHfZktUZagiHlLv9aTMiB de24Atm/bKZa/u5csbd3Q== X-Miltered: at discorde with ID 46843256.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; stack:01 stack:01 threading:01 hmmm:01 wrote:01 caml-list:01 functions:01 functions:01 precisely:01 awkward:02 argument:02 implicit:03 pattern:04 problem:05 accumulator:05 Dirk Thierbach 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? Hmmm. In principle, yes. I think that should be possible here. (Done this for a related problem where contextual typesetting information is passed around.) -- best regards, Thomas Fischbacher tf@functionality.de