Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <433-929-6894@kylheku.com> Newsgroups: comp.lang.lisp Subject: Re: Puzzled by SBCL evaluating some Scheme code Date: Wed, 27 Mar 2024 06:39:31 -0000 (UTC) Organization: A noiseless patient Spider Lines: 34 Message-ID: <20240326233251.513@kylheku.com> References: <87o7b08a6t.fsf@axel-reichert.de> Injection-Date: Wed, 27 Mar 2024 06:39:31 +0100 (CET) Injection-Info: dont-email.me; posting-host="8f377292846874240a48d49262348abc"; logging-data="2832309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hc/PnRfCOF4XaCtnmu+CMVdRnWgwqfOs=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:6svtFmjDRIQTe6XbJd3fF4fy+Ag= Bytes: 1980 On 2024-03-27, Axel Reichert wrote: > However, at one point I managed to paste an expression into the wrong > REPL, SBCL instead of Guile, and got > > (list + - * /) > evaluated by SBCL as > > (NIL (LIST + - * /) NIL NIL) In the Common Lisp interactive listener (a.k.a. REPL), there is a standard variable called - which evaluates to the form currently being evaluated: https://www.lispworks.com/documentation/lw50/CLHS/Body/v__.htm There are also variables +, ++ and +++, which hold less recent values of -. https://www.lispworks.com/documentation/lw50/CLHS/Body/v_pl_plp.htm There also *, ** and ***, which hold the primary value of the three most recent REPL evaluations, and: https://www.lispworks.com/documentation/lw50/CLHS/Body/v__stst_.htm As well as /, // and ///, which hold the lists of all the values of the three most recent evaluations. https://www.lispworks.com/documentation/lw50/CLHS/Body/v_sl_sls.htm -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca