[mercury-users] list functor style functions

Peter Schachte schachte at cs.mu.OZ.AU
Mon Nov 15 21:29:07 AEDT 1999


On Mon, Nov 15, 1999 at 01:56:33PM +1100, David Overton wrote:
> > I think you want something like a destructive_input_sequence type class,
> > which is like an input_sequence, except that you can't backtrack over
> > deconstructions
> 
> Actually, the way I've implemented it, using extras/lazy_evaluation/lazy.m, 
> you _can_ backtrack over the deconstruction function, due to the
> operational semantics of force/1 which will cause the closure to
> be evaluated only once.

Cool!  But does this mean the entire content of the file will be
buffered in memory, even if the code is deterministic?  I don't think
that would be an acceptable overhead.

-- 
Peter Schachte                     I do not feel obliged to believe that the
mailto:schachte at cs.mu.OZ.AU        same God who has endowed us with sense,
http://www.cs.mu.oz.au/~schachte/  reason, and intellect has intended us to
PGP: finger schachte at 128.250.37.3  forgo their use. -- Galileo Galilei 
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list