Datastar in Clojure Exercises
Now build it

Exercises

Each lesson's key functions with the bodies removed and the tests left in. Read the post, then make the tests pass.

The exercise copies live in clojure/ex/exercises/lessonNN and go/exercises/lessonNN; each blank is a TODO that throws, with a hint above it. At a REPL: clj -A:ex, then (require 'exercises.lessonNN.ns-test :reload) and (clojure.test/run-tests 'exercises.lessonNN.ns-test). The reference lessons are the answer key.

Part 1 · HTML over the wire

cd clojure && clojure -M:ex -d ex -n exercises.lesson01.<ns>-test
cd go && go test ./exercises/lesson01/

Part 2 · The event stream

cd clojure && clojure -M:ex -d ex -n exercises.lesson02.<ns>-test
cd go && go test ./exercises/lesson02/

Part 3 · Signals

cd clojure && clojure -M:ex -d ex -n exercises.lesson03.<ns>-test
cd go && go test ./exercises/lesson03/

Part 4 · When to use a signal

cd clojure && clojure -M:ex -d ex -n exercises.lesson04.<ns>-test
cd go && go test ./exercises/lesson04/

Part 5 · Shaping the backend

cd clojure && clojure -M:ex -d ex -n exercises.lesson05.<ns>-test
cd go && go test ./exercises/lesson05/

Part 6 · One stream, many viewers

cd clojure && clojure -M:ex -d ex -n exercises.lesson06.<ns>-test
cd go && go test ./exercises/lesson06/

Part 7 · Replacing the React Native app (optional)

cd clojure && clojure -M:ex -d ex -n exercises.lesson07.<ns>-test
cd go && go test ./exercises/lesson07/