Discussion:
Bug: (for X previous Y ...) does not check existence of Y
Ilya Perminov
2018-01-16 01:12:08 UTC
Permalink
Hello,


Iterate silently ignores "for ... previous" clauses that reference undefined variables, e.g,

(iter (repeat 2)
(for x previous y initially 0)
(collect x))

returns (0 0).


A patch to fix the bug is attached. Can someone apply it please.


Thanks,

Ilya
Attila Lendvai
2018-01-16 15:15:38 UTC
Permalink
Post by Ilya Perminov
Iterate silently ignores "for ... previous" clauses that reference undefined
variables, e.g,
(iter (repeat 2)
(for x previous y initially 0)
(collect x))
returns (0 0).
A patch to fix the bug is attached. Can someone apply it please.
pushed. thanks for the report and the fix!
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Precisely at the point when you begin to develop a conscience you
must find yourself at war with your society.”
— James Baldwin (1924–1987), 'A Talk for Teachers' (1963)
Loading...