(mac chain (x . body) (w/uniq u `(let ,u ,x ,@(map (fn ((f . args)) ;; could use list* but Arc 3.1 doesn't include it `(,f ,u ,@args)) body) ,u)))
(chain path (move-to 10 10) (stroke "red") (fill "blue") (ellipse 50 50))
;; Basic DOM (chain (div) (set-attribute "bar" "qux") (append-child (div))) ;; jQuery (chain ($ "foo") (offset 10) (add-class "bar") (click (fn ...)))