chapter 11 passed #11

Merged
navicore merged 2 commits from chapter11 into main 2026-06-22 13:44:13 +00:00
Owner
No description provided.
chapter 11 passed
All checks were successful
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 57s
e42e85baaf
● Chapter 11 rebuilt around the use. 58 exercises, all green.
All checks were successful
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 42s
0e9f444e10
What changed

  The old chapter showed call/=.. as thin pass-through wrappers (relate(P,A,B) :- call(P,A,B)) — exactly the
  "artificial wrapping with the same args" you named. The reworked chapter makes the meta-call load-bearing: each
  task is something you genuinely cannot write without it, and each prose section shows the painful without-it
  version first.

  ┌─────┬──────────────┬──────────────────────────────────────────────┬────────────────────┐
  │  #  │   Exercise   │                   The job                    │ Library equivalent │
  ├─────┼──────────────┼──────────────────────────────────────────────┼────────────────────┤
  │ 01  │ all_pass/2   │ every element satisfies a test you're handed │ forall             │
  ├─────┼──────────────┼──────────────────────────────────────────────┼────────────────────┤
  │ 02  │ keep/3       │ filter to elements satisfying a predicate    │ include/3          │
  ├─────┼──────────────┼──────────────────────────────────────────────┼────────────────────┤
  │ 03  │ apply_each/3 │ transform every element via a predicate      │ maplist/3          │
  ├─────┼──────────────┼──────────────────────────────────────────────┼────────────────────┤
  │ 04  │ apply_op/3   │ dispatch by a name held in data (=.. + call) │ —                  │
  └─────┴──────────────┴──────────────────────────────────────────────┴────────────────────┘

  The unifying idea is stated up front: one rule that works for any predicate you pass it. Exercise 01's prose
  puts the duplicated all_positive/all_even recursions side by side, then collapses them into one all_pass.
  Exercise 02 motivates call's extra-args feature through partial application (above(3) as a one-arg test built
  from data). Exercise 04 frames =.. dispatch against the one-clause-per-name table it replaces.

  Dropped, honestly

  copy_term/2 is gone — its real uses (meta-interpreters, term rewriting) are beyond where the curriculum is, and
  "fill a template twice" was the contrived framing you reacted to. It's noted in the design doc as deferred to a
  later, motivated home rather than faked here. (functor/3 construct stays deferred too — that one's a genuine
  plgc bug.)

  So: not you, and not "need more language first." The exercises owed you the payoff and didn't deliver it. They
  do now.

  just ci green at 58. Docs (README, ROADMAP, design matrix) updated, and I recorded the principle — teach the
  use, not the mechanism; defer rather than fake-motivate — so it guides chapters 12–16.
navicore deleted branch chapter11 2026-06-22 13:44:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/loglings!11
No description provided.