You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec823d8
Browse filesBrowse the repository at this point in the historyBrowse files
feat: teach defaultdict and map/filter on the canvas (curriculum phase 0c/0d)
- defaultdict(factory): dict box carrying a default factory; a missing-key
read both returns and stores the factory value
- map(fn, it) / filter(pred, it): lazy iterator objects that hold a reference
to both the source iterator and the function, drawn as a reference chain
- functools.reduce(fn, it): eager fold
- bare constructor names (int, list, ...) now resolve to builtin objects so
they can be passed as factory/transform arguments
- canvas + snapshot: mapiter/filteriter edges (source + fn), defaultdict
factory tag and entry refs
- new 'Defaults & Functional' series: 4 levels (35 total across 9 series)
- README/DESIGN updated to 35 levels / 9 series
Not in v0: classes, real module imports (only the simulated `copy`), control flow (`if`/`for`/`while`), exceptions (beyond clean parse/runtime errors), comprehensions, I/O, async, `range`/`sorted`/`min`/`max`/`abs`, full CPython semantics.
72
+
Not in v0: classes, real module imports (only the simulated `copy`, `collections`, `functools`), control flow (`if`/`for`/`while`), exceptions (beyond clean parse/runtime errors), comprehensions, I/O, async, `range`/`sorted`/`min`/`max`, full CPython semantics.
72
73
73
74
A planned curriculum extends this with numpy, pandas, re, datetime and more — all drawn on the same memory canvas. See `docs/ENGINE-EXTENSION.md` and `docs/adr/002-library-modules.md`.
74
75
@@ -77,7 +78,7 @@ A planned curriculum extends this with numpy, pandas, re, datetime and more —
@@ -89,7 +90,7 @@ The engine is intentionally a **teaching subset**, not CPython. Every state tran
89
90
90
91
## Levels
91
92
92
-
Eight series — Names & Bindings, Aliasing & Copy, Containers in Memory, **Copy Semantics** (shallow vs deep), **Iterators & Iterables**, Mutation & Methods, Functions & Frames, Plotting & Capstone. Each of the 31 levels has a brief, optional hint, a goal (predicate or target snapshot), a statement-par for golf, and a worked solution.
93
+
Nine series — Names & Bindings, Aliasing & Copy, Containers in Memory, **Copy Semantics** (shallow vs deep), **Iterators & Iterables**, **Defaults & Functional** (defaultdict, map, filter), Mutation & Methods, Functions & Frames, Plotting & Capstone. Each of the 35 levels has a brief, optional hint, a goal (predicate or target snapshot), a statement-par for golf, and a worked solution.
0 commit comments