[Bese-devel] method combination

Larry D'Anna smoof-ra at elder-gods.org
Wed Aug 10 20:08:35 UTC 2005


* R. Joseph Wright (joseph at mammalia.net) [050810 15:57]:
> 
> On Aug 9, 2005, at 9:07 PM, Larry D'Anna wrote:
> 
> >here's standard method combination for the interpreter.  Also adds  
> >&rest support.
> 
> Can you explain this part?
> 
> >(defparameter *c* nil)
> >
> >defmethod/cc supercool :before (x)
> >  (print 'before)
> >  (let/cc k (setq *c* k)))
> >
> >(with-call/cc
> >  (supercool 7))
> >
> >;IPRE
> >;PRE
> >;BEFORE
> >
> >(kall *c*)
> >
> >;1007
> >;2007
> >;AFTER
> >;POST
> >;IPOST

It's the same as the part before except this time we save the
continuation and quit in the :before method, and then resume
the continuation on a separate line.  The point of the patch is
to make sure that the logic that runs the various methods of a
generic function occurs in the cc-interpreter, so call/cc can be 
used in any of the methods.

     --larry



More information about the bese-devel mailing list