Re: anaphoric macro question
- From: Pascal Costanza <pc@xxxxxxxxx>
- Date: Wed, 16 Nov 2011 06:51:06 +0100
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?
Pascal
--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
The views expressed are my own, and not those of my employer.
.
- References:
- anaphoric macro question
- From: hans
- anaphoric macro question
- Prev by Date: Re: Thoughts on SETF
- Next by Date: Re: Thoughts on SETF
- Previous by thread: anaphoric macro question
- Next by thread: Re: anaphoric macro question
- Index(es):