Open sarna opened 1 week ago
It'd be nice if Janet warned you (threw an error, printed a warning, ...) when you don't provide the body for seq, for example:
seq
(seq [i :range [0 5]])
Right now it will happily return @[nil nil nil nil nil]. I can't think of a reason why a user wanted to write it this way.
@[nil nil nil nil nil]
The same thing happens with loop, not sure about other looping constructs.
loop
I guess if one wanted 5 nils, it would be clearer to express it like:
(seq [i :range [0 5]] nil)
It'd be nice if Janet warned you (threw an error, printed a warning, ...) when you don't provide the body for
seq
, for example:Right now it will happily return
@[nil nil nil nil nil]
. I can't think of a reason why a user wanted to write it this way.The same thing happens with
loop
, not sure about other looping constructs.