chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] making lambdas more introspective


From: Peter Bex
Subject: Re: [Chicken-users] making lambdas more introspective
Date: Sat, 28 May 2005 14:26:18 +0200
User-agent: Mutt/1.4.2.1i

On Sat, May 28, 2005 at 01:41:27AM -0400, Michele Simionato wrote:
> ;; example:
> 
> > (define sum3 (introspective-lambda (x y z) (+ x y z)))
> > (lambda-signature sum3)
> (x y z)
> 
> However, I think this is useful enough to have in the core language (we
> could even implement a help system!). One would have to store a few 
> bytes more to keep the signature in memory, but it does not look as a big 
> deal. 
> Any thoughts, comments, ideas?

Nifty!  I would very much like to see this in chicken.  Maybe the syntactic
sugar version of the define form could do this automagically?
Or make a commandline switch to define if it should be done or not, optionally
to save memory.

One issue is that of course, the compiled version should have this data
removed.  I'm not sure if currently all extended procedure data is removed
or not.

Regards,
Peter
-- 
http://www.student.kun.nl/peter.bex
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgppeuruwvcgb.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]