On Apr 30, 2009, at 1:11 AM, Ramana Kumar wrote:
Actually if I'm going to be defining my own macro, I usually just do (define-syntax carn (syntax-rules () ((_ n e) (let ((p e)) (if (pair? p) (car p) (error 'n "not a pair" p)))))) and pass an identifier to carn... and then I can get rid of the check by adding another line to the macro... but it doesn't look as nice as just using car
This doesn't show the file position; your carn does not work like the first-class car; and it requires two subforms while car takes one argument. The solution I have in mind does all of that. Aziz,,,
