damn:

(define-syntax with-slots
  (syntax-rules ()
    ;;this  is here  only to  let  me remove  the bindings
while
    ;;debugging the form
    ((_ ((() () ?object)) ?form ...)
     (begin ?form ...))

    ((_ (((?sym ...) (?slot ...) ?object)) ?form ...)
     (let ((?sym (slot-ref ?object '?slot))
           ...)
       ?form ...))

    ((_ (((?sym1 ...) (?slot1 ...) ?object1)
         ((?sym2 ...) (?slot2 ...) ?object2)
         ...) ?form ...)
     (with-slots (((?sym1 ...) (?slot1 ...) ?object1))
       (with-slots (((?sym2 ...) (?slot2 ...) ?object2) ...)
         ?form ...)))))

--
Marco Maggi

"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"




_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to