1. Miki Tebeka
  2. dr-evil


Miki Tebeka  committed 21f7840

The league for macro elimination (thanks jreevs)

  • Participants
  • Parent commits 2a14db4
  • Branches default

Comments (0)

Files changed (1)

File src/dr/evil.clj

View file
  • Ignore whitespace
 ; html will come later since it's big
 (declare html)
-(defn evil [path expr]
-  (if (nil? expr)
-    (html path)
-    (json-str (eval-expr expr))))
-(defmacro EVIL [path]
-  `(~'GET ~path {~'params :params} (evil ~path (~'params "expr"))))
+(defn EVIL [path]
+  (GET path [expr]
+    (if (nil? expr)
+      (html path)
+      (json-str (eval-expr expr)))))
 ; HTML goes here (this is at the end since it's long).
 ; We embed the HTML in the clojure file so we won't have to muck around with