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

[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?

the Internet made me do it