An ordered set of instructions. It reads input, follows rules, and produces output.
Workspace
Clojure
Lisp on the JVM data transformation and interactive systems
Definition first
What Clojure means
Clojure is a programming language for writing exact instructions, often used for Lisp on the JVM data transformation and interactive systems. Start with one mental model: input goes through steps and becomes output.
main.cljRun clojure -M main.cljHabit Work at the REPL and transform immutable data step by stepA value is data. A variable is the name you use to hold and reuse that data.
A named piece of work. It takes input, does one job, and can return a result.
Clojure CLI is the place that actually runs code from main.clj.
First readable code
Program output
entry point output syntax println(println 42)
Output 42Language lineage
Clojure family tree
See where Clojure comes from, which languages feel close, and what to learn next.
Zero base path
Question bank
Search before practice
Pick a stage or search across the open programming bank. Jump straight to the matching drill.
Clojure practice 1
Clojure question 1. Choose the statement that matches printing a value.
Clojure practice 2
Clojure question 2. Choose the statement that matches naming a value.
Clojure practice 3
Clojure question 3. Choose the statement that matches reusable function.
Clojure practice 4
Clojure question 4. Choose the statement that matches basic collection.
Clojure practice 5
Clojure question 5. Choose the statement that matches printing a value.
Clojure practice 6
Clojure question 6. Choose the statement that matches naming a value.
Clojure practice 7
Clojure question 7. Choose the statement that matches reusable function.
Clojure practice 8
Clojure question 8. Choose the statement that matches basic collection.
Clojure practice 9
Clojure question 9. Choose the statement that matches printing a value.
Clojure practice 10
Clojure question 10. Choose the statement that matches naming a value.
Clojure practice 11
Clojure question 11. Choose the statement that matches reusable function.
Clojure practice 12
Clojure question 12. Choose the statement that matches basic collection.
Clojure practice 13
Clojure question 13. Choose the statement that matches printing a value.
Clojure practice 14
Clojure question 14. Choose the statement that matches naming a value.
Clojure practice 15
Clojure question 15. Choose the statement that matches reusable function.
Clojure practice 16
Clojure question 16. Choose the statement that matches basic collection.
Clojure practice 17
Clojure question 17. Choose the statement that matches printing a value.
Clojure practice 18
Clojure question 18. Choose the statement that matches naming a value.
Multiple choice
Clojure practice 1
Clojure question 1. Choose the statement that matches printing a value.
(println 42)
Reference
Patterns for main.clj
clojure -M main.cljentry point output syntax println
Program output
(println 42)
- Run the smallest file first
- Print one known value
- Check the output before adding more code
variables assignment types def
Values and names
(def total 42) (println total)
- Give values readable names
- Keep one idea per line while learning
- Trace the value before changing it
function collection Vector
Functions and collections
(defn add [a b] (+ a b)) (def scores [40 2]) (println (count scores))
- Keep functions small
- Return useful values
- Use the common collection before reaching for frameworks