Skip to content

Instantly share code, notes, and snippets.

@mpontus
Created February 13, 2015 03:14
Show Gist options
  • Save mpontus/9eb2a51993e506e6ba9a to your computer and use it in GitHub Desktop.
Save mpontus/9eb2a51993e506e6ba9a to your computer and use it in GitHub Desktop.
(defun names-introspect-replace-labels (fn form)
(let* ((vars names--var-list)
(bindings (--> (-map 'symbol-value vars)
(-interleave vars it)
(-partition 2 it))))
`(lexical-let ,bindings ,form)
))
(defmacro names-introspect-replace-labels-1 (bindings form)
`(lexical-let ,bindings ,form))
(let ((names--name 'asd))
(names-introspect-replace-labels
(defun test nil names--name)))
(define-namespace new-
(defun test nil names--name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment