I am new to newlisp and I managed to read and process lines from stdin this way:
Code: Select all
(while (read-line)
(println (slice (current-line) (div (length (current-line) ) 2)))
)
I would like to do this by calling a function for each line of input but I cannot get it running. I thought of something like this:
Code: Select all
(map (fn(line)
(println ..)
(read-line)
)
Thanks
t3o