[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Extent of function definition created by FLET/LABELS
- To: NGALL%G.BBN.COM@SCRC-STONY-BROOK.ARPA, common-lisp@SU-AI.ARPA
- Subject: Extent of function definition created by FLET/LABELS
- From: David C. Plummer <DCP@SCRC-QUABBIN.ARPA>
- Date: Tue, 8 Apr 86 19:49 EST
- In-reply-to: <[G.BBN.COM] 8-Apr-86 18:06:32.NGALL>
Date: 8 Apr 1986 18:06-EST
From: NGALL@G.BBN.COM
Is the following legal CL:
(funcall (labels ((foo () (print "hello"))
(bar () (foo)))
#'bar))
If not, where is it forbidden?
-- Nick
P.S. It works in VaxLisp.
I'm very surprised CLtL does not say that the functions created by FLET
and LABELS have lexical scope (I think it does say that) and indefinite
extent (that's what it doesn't say). Page 37 does say "most Common Lisp
data objects have indefinite extent." I think you will find most
implementations will interpret FLET and LABELS to have indefinite
extent.