guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (. wtf?)


From: Dr. Arne Babenhauserheide
Subject: Re: (. wtf?)
Date: Sun, 07 May 2023 21:44:33 +0200
User-agent: mu4e 1.10.2; emacs 29.0.90

Dmitry Alexandrov <dag@gnui.org> writes:

> but explicitly documented in (info "(elisp) Dotted Pair Notation") as well:
>
> #+begin_quote
>    As a somewhat peculiar side effect of ‘(a b . c)’ and ‘(a . (b . c))’
> being equivalent, for consistency this means that if you replace ‘b’
> here with the empty sequence, then it follows that ‘(a . c)’ and ‘(a . (
> . c))’ are equivalent, too.  This also means that ‘( . c)’ is equivalent
> to ‘c’, but this is seldom used.
> #+end_quote

Also this is what SRFI-119 / wisp generalizes to enable continuing the
argument list in indentation-based Scheme without introducing additional
syntax. In wisp, not only is =(equal? '(. wtf) 'wtf)=, but also

equal?
  ' a b c
  ' : . a b c

(a structure which is a syntax error in regular Scheme, so no ambiguity
is introduced: =(equal? '(a b c) '((. a b c)))= ⇒ missing close paren: b)

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]