Browse thread
The Implicit Accumulator: a design pattern using optional arguments
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Thomas Fischbacher <tf@f...> |
| Subject: | Re: [Caml-list] The Implicit Accumulator: a design pattern using optional arguments |
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