janet icon indicating copy to clipboard operation
janet copied to clipboard

Warning/error on seq with no body

Open sarna opened this issue 7 months ago • 1 comments

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 [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.

The same thing happens with loop, not sure about other looping constructs.

sarna avatar Jun 28 '24 16:06 sarna