Skip to content
AgileLogics
Intermediate 5 min read

Intermediate Projects

Prerequisites: Level 2 — Intermediate

Build these using destructuring, the sequence library, atoms, protocols, multimethods, files, EDN/JSON, and transducers from Level 2.

1. Library Management System

Keep books, members, and loans in one atom of plain data, with pure functions for lending and returning that throw ex-info on invalid operations. Save the state as EDN and load it back on start.

2. Log Analyzer

Read a log file with line-seq, parse each line with a regex into a map, and report counts per level, the busiest hour, and the most frequent errors — once with sequences and once with a transducer.

3. Shape Calculator

Define a Shape protocol with records for circles, rectangles, and triangles, plus a multimethod that renders a shape description differently for :text, :json, and :edn output formats.

4. Bank Simulation

Model accounts as refs, run thousands of concurrent transfers with future and dosync, and verify the total balance never changes.