Subject: Re: Q: local static variables?
From: Erik Naggum <erik@naggum.no>
Date: 1996/03/17
Newsgroups: comp.lang.lisp
Message-ID: <3036015280619213@arcana.naggum.no>

[Antonio Leitao]

|   I was wondering if we can have static local variables.

check out `closure' in your friendly Lisp textbook.

|   We know that we could create an equivalent function IF WE COULD define
|   the variable 'y' outside the definition of 'test1', something such as:
|   
|   (let ((y 0))
|     (defun test2 ()
|       (incf y)
|       y))

precisely.  have you tried this?  if it fails, which Lisp are you using?

#<Erik>
-- 
the Internet made me do it