Skip to content

Instantly share code, notes, and snippets.

@axurright
Last active November 10, 2024 16:14
Show Gist options
  • Select an option

  • Save axurright/9b17e01169369e6c7574e73f27040519 to your computer and use it in GitHub Desktop.

Select an option

Save axurright/9b17e01169369e6c7574e73f27040519 to your computer and use it in GitHub Desktop.
How to make functions in Clojure (mostly for me)
;; Example in docs
(defn greet [name]
(str "Hello, " name))
;; My first ever function (very neat)
(defn selfgrade [grade]
(str "Your own grade: " grade))
;; Calling your function
(selfgrade "10")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment