Re: anaphoric macro question

On 16/11/2011 04:53, hans wrote:
I would like to see what are the ways or possibilities to write an
anaphoric macro, say "do-line", which takes successive lines from a
file and binds them to 'it', so you can do:

(do-line filename
(print it)) ;do something with 'it', the line

just as

(with-open-file (s "test.txt")
(loop for line = (read-line s nil)
while line do
(print line)))

thank you

This is very basic macrology. You should be able to do this by yourself. How far did you get already?


My website:
Common Lisp Document Repository:
Closer to MOP & ContextL:
The views expressed are my own, and not those of my employer.