Skip to content

Instantly share code, notes, and snippets.

@amalloy
Forked from ninjudd/core.clj
Created May 10, 2012 19:08
Show Gist options
  • Save amalloy/2655176 to your computer and use it in GitHub Desktop.
Save amalloy/2655176 to your computer and use it in GitHub Desktop.
(macro-do [name]
(let [{:keys [varname meta]} (graph-impl name)]
`(defn ~name ~(:doc meta)
(~'[head-id tail-id]
(apply ~name :over-layer ~'[head-id tail-id]))
(~'[layer-name head-id tail-id]
(apply ~varname (layer ~'layer-name) ~'[head-id tail-id]))))
merge-node! unmerge-node!)
@amalloy
Copy link
Author

amalloy commented May 10, 2012

(macro-do [name](let [{:keys [varname meta]} %28graph-impl name%29]
`%28defn name %28:doc meta%29
%28
'[head-id tail-id]
%28
name :over-layer @'[head-id tail-id]%29%29
%28
'[layer-name head-id tail-id]
%28~varname %28layer ~'layer-name%29 ~@'[head-id tail-id]%29%29%29)
merge-node! unmerge-node!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment