Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active January 22, 2017 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/2cf72b32d2c38a3a5da99261a7595c41 to your computer and use it in GitHub Desktop.
Save deque-blog/2cf72b32d2c38a3a5da99261a7595c41 to your computer and use it in GitHub Desktop.
(defn rator [e] (first e))
(defn rands [e] (rest e))
(defn cst? [n] (number? n))
(defn sym? [v] (string? v))
(defn op? [e] (vector? e))
(defn add? [e] (and (op? e) (= (rator e) :add)))
(defn mul? [e] (and (op? e) (= (rator e) :mul)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment