Skip to content

Instantly share code, notes, and snippets.

@josephwilk
Created September 30, 2013 16:56
Show Gist options
  • Save josephwilk/6766732 to your computer and use it in GitHub Desktop.
Save josephwilk/6766732 to your computer and use it in GitHub Desktop.
(defmacro pandoriclet (letargs &rest body)
(let [letargs (cons '(this) (let-binding-transform letargs))]
`(let (,@letargs)
(setq this ,@(last body))
,@(butlast body)
(dlambda
(:pandoric-get (sym)
,(pandoriclet-get letargs))
(:pandoric-set (sym val)
,(pandoriclet-set letargs))
(t (&rest args)
(apply this args))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment