Lisp-likeness

Fernando frr at easyjob.net
Tue Mar 15 18:49:00 CET 2005


On 15 Mar 2005 00:43:49 -0800, "Kay Schluehr" <kay.schluehr at gmx.net>
wrote:

>Maybe You can answer my question what this simple LISP function does ?
>
>(defun addn (n)
>	  #'(lambda (x)
>	      (+ x n)))

The same as 
def addn(n):
	def fn(x):
		return n + x
	return fn

>This is correct LISP-syntax if You bear in mind LISPs powerwull macro
>language...

defun is a macro but I don't think that's what you mean...



More information about the Python-list mailing list