Author: Taha El Amine Kassabi
Course: Functional Programming II (SSβ―2023)
Instructor: Prof. Dr. Michael Leuschel
University: Heinrich Heine University DΓΌsseldorf (HHU)
This repository contains solutions for Exercises 00β06, REPL demos, and project-based assignments for the Functional Programming II course at HHU. Topics span from generative testing, specs, and transducers to async channels, Datomic, and Re-frame apps in ClojureScript.
Exercises/
βββ 00-intro-code β Combinatorics, lazy streams, run-length encoding
βββ 01-test-check-material β Property-based testing with test.check, trampolines
βββ 02-spec β clojure.spec definitions & generators
βββ 03-transducers β Stateless stream processing & chaining
βββ 04-async β core.async with go blocks, mult, tap, timeout logic
βββ 05-datomic β Querying graph databases using Datomic
βββ lerneinheit-reframe-toolsdeps/
β βββ Re-frame Tic-Tac-Toe app in ClojureScript with full state/event handling
βββ repl2022-vertiefung/ β REPL-based walkthroughs of specs, test.check, ebt
Material/ β Lecture slides, tasks, solutions for all weeks
README.md β Course overview (this file)
| Week | Key Concepts |
|---|---|
| 00 | Lazy sequences, oscillators, run-length encode/decode |
| 01 | Property-based testing, trampolines, test.check |
| 02 | clojure.spec, predicates, functional design |
| 03 | Transducers, transformations, state-free composition |
| 04 | core.async, channels, go blocks, do-or-timeout macro |
| 05 | Datomic database queries, functional persistence |
| 06 | Re-frame SPA using subscriptions, events, and components |
# Install Clojure CLI
brew install clojure/tools/clojure
# Start REPL (deps.edn or project.clj based)
clj
lein replClojureScript + Re-frame requires:
npm install && npx shadow-cljs watch appcd Exercises/01-test-check-material
lein test # or run directly in REPLRun a ClojureScript app (Tic Tac Toe):
cd Exercises/lerneinheit-reframe-toolsdeps/aufgaben
npm install
npx shadow-cljs watch app
# open localhost:3000 in browser- Exercises mix project-based tasks and REPL-driven live coding.
- Functional patterns: immutability, stateless transforms, data-centric design.
- Abstract Highlights: custom transducers, async macros, full-stack Clojure(Script).