Last active
November 10, 2024 16:14
-
-
Save axurright/9b17e01169369e6c7574e73f27040519 to your computer and use it in GitHub Desktop.
How to make functions in Clojure (mostly for me)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; 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