Skip to content

Instantly share code, notes, and snippets.

@aamedina
Created May 12, 2014 13:32
Show Gist options
  • Select an option

  • Save aamedina/bc941432facc4e783e39 to your computer and use it in GitHub Desktop.

Select an option

Save aamedina/bc941432facc4e783e39 to your computer and use it in GitHub Desktop.
(macroexpand '(fn
([x] x)
([x & xs] (cons x xs))))
=>
(clojure.core/with-meta
(cljc.core/reify
clojure.lang.Fn
clojure.lang.IFn
(invoke [G__4128 G__4129] (let [[x] [G__4129]] x))
(invoke
[G__4130 G__4131 G__4132]
(let [[x] [G__4131] [& xs] G__4132] (cons x xs))))
{:tag nil})
((fn
([x] x)
([x & xs] (cons x xs))) 1 [2 3])
=> (1 2 3)
((fn
([x] x)
([x & xs] (cons x xs))) :hello)
=> :hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment