[pro] BOA constructor and supplied-p argument

Didier Verna didier at lrde.epita.fr
Sat Jun 11 11:03:23 UTC 2011


Pascal Costanza wrote:

> - The more important reason is that I sometimes want to derive some
> value from an argument that is "very close" to the value of the
> original argument. Here is an example:

  I would go even farther than that. Sometimes, you want to slightly
frob the original argument and not use it anymore afterwards. In such
situations, you can even use the same variable name (one might consider
this either very stylized or very ugly ;-).


CL-USER> (defun foo (arg &aux (arg (1+ arg)))
	   arg)
FOO
CL-USER> (foo 1)
2

-- 
Resistance is futile. You will be jazzimilated.

Scientific site:   http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com




More information about the pro mailing list