Done. Lists/destructuring is now a first-class chapter, and the curriculum is 7 chapters / 31 exercises: #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "lists"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
00-intro · 01-arithmetic · 02-terms · 03-operators · 04-lists · 05-comparison · 06-recursion
The new 04-lists chapter (all four verified on plgc, including negative cases):
first/2 and rest/2. Covers the one-element-list-has-tail-[] gotcha.
load-bearing.
prose, since the point is reading it until it stops looking like magic. This is the direct seed for double-each.
Recursion chapter updated to recall, not teach: 03-sum-list's inline [H|T] tutorial is gone — it now says "you
know both halves, put them together: the tail is itself a list, only shorter." Its hint (which opened "the first
time you destructure a list…") was rewritten, and 05-double-each now names swap_first_two as the move it's
applying at every step.
Placement rationale is captured in docs/design/lists-chapter.md: 04-lists completes the term-model arc (terms →
operators → lists-as-sugar) before the computation arc; 00-intro/05-list stays as a member/2 teaser. Comparison
and recursion renumbered to 05/06 across all three trees and info.toml.