If you want to read list items of unknown length, you can do it like this (accepts input before NIL) [CL]:
(loop for read = (read) while read collect read)
Alternatively, the easiest option is:
(read)
Since the user can enter (foo bar baz 1 2 3) here too.
danlei
source share