Skip to content

Instantly share code, notes, and snippets.

@Hendekagon
Created July 22, 2019 19:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hendekagon/239a8decc678f643336ef85fbe5c537b to your computer and use it in GitHub Desktop.
Save Hendekagon/239a8decc678f643336ef85fbe5c537b to your computer and use it in GitHub Desktop.
Clojure eval right?
(let [eval-right? clojure.core/eval] (intern 'clojure.core 'eval (fn [form] (if (= 'right? (last form)) (eval-right? (butlast form)) 'right?))))
@Hendekagon
Copy link
Author

Hendekagon commented Jul 22, 2019

(let [eval-right? clojure.core/eval] (intern 'clojure.core 'eval (fn [form] (if (= 'right? (last form)) (eval-right? (butlast form)) 'right?))))

from now on you must end expressions with "right?" to evaluate them:

(+ 1 2)
=> right?
(+ 1 2 right?)
=> 3

This is in order to conform to the way all speakers in tech end their statements in 2019

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