Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Sanity Check

Name: Anonymous 2009-09-25 19:16

Bad idea?
(defmacro letret (return-binding bindings &body body)
  `(let ,(cons return-binding bindings)
     ,@body
     ,(first return-binding)))

(defmacro letret* (return-binding bindings &body body)
  `(let* ,(cons return-binding bindings)
     ,@body
     ,(first return-binding)))

Name: Anonymous 2009-09-25 21:34

I see /prog/ is filled with retards today.

As for the answer to OP's questions:

It doesn't seem like that bad of an idea, but it does seem limited, since you can only return the first binding, which may not always be possible. If it works for you, use it, otherwise you might want to look into some anaphoric macros (P.G's from On Lisp and this one: http://common-lisp.net/project/anaphora/ )

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List