fn abstraction?



so I've been wondering, am I missing something hideously wrong with
this? As in, is there something ugly, etc? because it's clear when you
use it for one use or the other, and I'm wondering why it's not been
done before (probably readability?).

(defmacro fn (&body bd)
(if (consp (first bd))
`(function (lambda ,(first bd) ,@(cdr bd)))
`(defun ,(first bd) ,(second bd) ,@(cddr bd))))

as in

(mapcar #'(lambda (x y) (list x y)) lst1 lst2) =>

(mapcar (fn (x y) (list x y)) lst1 lst2)

nate

ps I might have stolen the idea from arc

.



Relevant Pages

  • Re: Tow weight??
    ... My truck doesn't seem to run any different at sea level. ... What am I missing? ... Nate ...
    (rec.outdoors.rv-travel)
  • Re: pstricks macro carc not working as advertised
    ... and subscripts to place text along the arc, e.g., ... However, if I use this syntax, I get ... Missing $ inserted. ...
    (comp.text.tex)
  • Printing an arc in Word 2007 with Equation Editor
    ... I am having trouble printing a Word 2007 doc that has equations ... created using the new Equation Editor. ... Equations with an arc over numbers ... arcs are missing. ...
    (microsoft.public.word.docmanagement)