As Alex pointed out, self doesn't exist, but since Clojure is a Lisp you could trivially add this support. I'm not recommending you do this, but it's fun.
We'll want symbol macros, which work like macros but are, well, symbols (in this case we'll use symbol-macrolet from the org.clojure/clojure.tools.macro library).
Try this!
From the command line:
clj -Sdeps '{:deps {org.clojure/tools.macro {:mvn/version "0.1.2"}}}'
Once you have a repl, we'll pull in the tools.macro library:
(require '[clojure.tools.macro :refer [symbol-macrolet]])
Then, we'll define a new macro, defns, which will allow you to refer to the function name using self:
(defmacro defns
[name & args]
`(symbol-macrolet [~'self ~name]
(defn ~name
~@args)))
Usage:
Define a function using defns:
(defns foo
([] (self 2))
([n] (* 2 n)))
test it:
user=> (foo)
4
user=> (foo 5)
10
Be careful with macros though– they're a lot of fun and easy to abuse. ;)