GNU bug report logs -
#28254
26.0.50; SRFI-2 and-let*
Previous Next
Reported by: Mark Oteiza <mvoteiza <at> udel.edu>
Date: Sun, 27 Aug 2017 20:12:02 UTC
Severity: wishlist
Found in version 26.0.50
Done: Mark Oteiza <mvoteiza <at> udel.edu>
Bug is archived. No further changes may be made.
Full log
Message #83 received at 28254 <at> debbugs.gnu.org (full text, mbox):
Mark Oteiza <mvoteiza <at> udel.edu> writes:
> > In `internal--listify':
> > isn't (or (listp form) (atom form)) always true?
>
> Yes, that could instead be (or form (null form)). It's meant to catch
> things like this:
>
> (should (equal nil (and-let* ((nil) (x 1)))))
Why can't we just replace it with the equivalent `t' (and simplify the
code accordingly)?
> > Secondly, in `internal--build-binding-value-form':
> > How can it happen that (car binding) is an atom but not symbolp? And if
> > (car binding) == var is not a symbol, how does the returned binding make
> > sense?
>
> It's an expression, like a number.
>
> (should (equal 1 (and-let* ((2) (x 1)))))
AFAICT, this doesn't run the code I mention. If I trace
`internal--build-binding-value-form' and try this, I get
1 -> (internal--build-binding-value-form (#:s nil) t)
1 <- internal--build-binding-value-form: (#:s (and t nil))
======================================================================
1 -> (internal--build-binding-value-form (x 1) #:s)
1 <- internal--build-binding-value-form: (x (and #:s 1))
In both cases, (car binding) evals to a symbol.
Thanks,
Michael.
This bug report was last modified 7 years and 253 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.