Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site think.ARPA Path: utzoo!watmath!clyde!cbosgd!ihnp4!think!massar From: massar@think.ARPA (J.P. Massar) Newsgroups: net.lang.lisp Subject: Re: Lisp Question Message-ID: <1653@think.ARPA> Date: Sat, 18-May-85 12:34:35 EDT Article-I.D.: think.1653 Posted: Sat May 18 12:34:35 1985 Date-Received: Sun, 19-May-85 06:21:57 EDT References: <394@gitpyr.UUCP> Reply-To: massar@think.UUCP (J.P. Massar) Distribution: net Organization: Thinking Machines, Cambridge, MA Lines: 22 In article <394@gitpyr.UUCP> scott@gitpyr.UUCP (Scott Holt) writes: > > ( defun myfunction ( p-list ) ( eval body ) ) > myfunction > > then later > >> ( setq body '( car p-list ) ) > (car p-list) >> ( myfunction '(a b c d)) > a In Common Lisp this will not work because the eval function evaluates its argument in the null lexical environment (Common Lisp, p 321, Guy Steele). Since plist is only bound in the lexical environment of myfunction this should result in an UNBOUND VARIABLE or similar error instead of evaluating to 'a'. In fact, using Kyoto Common Lisp this is exactly what happens. -- -- JP Massar, Thinking Machines Corporation, Cambridge, MA -- mit-eddie!godot!massar, ihnp4!godot!massar, massar@think, massar@cca-unix