One of my favorite things about Clojure is just how much it does not care about what you feed it. The other day, I thought I'd see if there was a symbol I could declare that Clojure didn't like (which didn't include reserved characters such as '
or (
).
While I don't recommend that anybody ever use names like these, I still think it's pretty cool that I can name a function after an emoji.
Please enjoy this collection of oddly named Clojure functions.
=> (defn π€£ [] "ROFL")
=> (π€£)
"ROFL"
=> (defn aβb [] "A emoji plus B!")
=> (aβb)
"A emoji plus B!"
=> (defn $5 [] "Five Dollars")
=> ($5)
"Five Dollars"
=> (defn &hello [] "Hello!")
=> (&hello)
"Hello!"
=> (defn a||b [] "A? Or... B!?")
=> (a||b)
"A? Or... B!?"
=> (defn . [] "Period.")
=> (.)
Syntax error...
=> (#'user/.)
"Period."
=> (defn a=b [] "A equals B")
=> (a=b)
"A equals B"
=> (defn a+b [] "A plus B")
=> (a+b)
"A plus B"
=> (defn fΒΊ [] "Fahrenheit")
=> (fΒΊ)
"Fahrenheit"
=> (defn ΒΊ [] "Degree")
=> (ΒΊ)
"Degree"
=> (defn a%b [] "A mod B")
=> (a%b)
"A mod B"
=> (defn a_b [] "A under B")
=> (a_b)
"A under B"
=> (defn a?-nah-b! [] "A? Nah, B!")
=> (a?-nah-b!)
"A? Nah, B!"
=> (defn hash# [] "Hash")
=> (hash#)
"Hash"
=> (defn a.b.c [] "A, B, C, ...")
=> (a.b.c)
Syntax error...
=> (#'user/a.b.c)
"A, B, C, ..."
=> (def Ο Math/PI)
=> Ο
3.141592653589793
Note
These were only tested in .clj
and may not transpile in .cljs
.
Top comments (0)