Skip to content

Instantly share code, notes, and snippets.

@AlexBaranosky
Created January 10, 2014 00:16
Show Gist options
  • Save AlexBaranosky/8344641 to your computer and use it in GitHub Desktop.
Save AlexBaranosky/8344641 to your computer and use it in GitHub Desktop.
(defn- expand-arg [arg]
(if (symbol? arg)
arg
(first (single-destructuring-arg->form+name arg))))
(defn print-and-return
"Diagnostic tool for printing the result of evaluating an s-expression.
Any initial args over 1, are printed as strings, and generally used as a label."
[& xs]
(when (seq (butlast xs))
(print (apply str (butlast xs))))
(gui-diff/p (last xs))
(last xs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment