Skip to content

amamparo/clojure-dojo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clojure-dojo

A self-contained Clojure kata dojo for a programmer new to Clojure, and to functional programming itself. DENSHO.md is the learning narrative; the katas live in src/katas. Most are ;; TODO stubs; katas 7 and 13 instead hand you working-but-flawed code to read and fix. Each kata's tests are already written against the intended solution, and are red until you make them pass.

The discipline

You solve the katas yourself. DENSHO.md is the only text you need: no Google, no LLM. DENSHO and the tests are the whole oracle. The point is to finish with the language in your hands.

What you need

  • a JDK — Adoptium; the 21 LTS is the happy path (the dojo runs Clojure 1.12 on JDK 21)
  • the Clojure CLI
  • just — tests, lint, and formatting are all just recipes

Where to start

Open DENSHO.md at the top and work straight down; the order is the curriculum. It gates each kata with a > ## 🥋 Complete kata N break, placed exactly where the prose above has equipped you for it. At each break, solve that kata in src/katas and make its tests green:

just test                 # every test in the repo
just test 1               # every test for kata 1
just test 1 some-test     # one test by name, in kata 1

A fresh clone lints clean and is formatted; the tests are red until you solve the katas.

Tasks

command what
just test [k [name]] run tests — all, kata k, or one named
just lint clj-kondo over src and test
just format check formatting (zprint; no changes)
just fix reformat src and test in place (zprint)
just check format then test (fail-fast)

Katas

DENSHO.md is authoritative for order and pacing; the list below is orientation only. Katas 7 and 13 ship working-but-flawed code to read, fix, and extend; the rest are blank stubs.

  1. FizzBuzz
  2. Temperature
  3. Word frequencies
  4. Roster
  5. Anagrams
  6. Run-length encoding
  7. Inventory — extend existing code
  8. Primes
  9. Digits
  10. Roman numerals
  11. Bowling
  12. RPN
  13. Bank account — extend existing code
  14. my-memoize
  15. Shapes
  16. Macros
  17. Tiny interpreter

License

MIT.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Contributors