docs: state the arity-1 carve-out that makes 'one rule, one sentence' true (fixes #635)#672
Merged
InauguralPhysicist merged 1 commit intoJul 18, 2026
Conversation
SPEC.md's "one rule, one sentence" and LANGUAGE_CONTRACT.md's argument- unpacking section both claim brackets after `of` always spread into the callee's parameters positionally. That's false for a 1-parameter, non-defaulted callee: it has only one slot, so a 2+-element literal list re-collects whole and binds to that parameter instead of spreading (`one of [3, 4]` binds `a = [3, 4]`, not `a = 3`, for `define one(a)`). This is exactly what keeps `len of [1, 2]` and `print of [1, 2]` working — the implementation is right and load-bearing, so the docs are corrected to describe it instead. Adds the carve-out next to both "one rule" statements in SPEC.md (the call section and the evaluation-model reference) and alongside the existing `f of []` note in LANGUAGE_CONTRACT.md, plus a new executable SPEC.md example that pins the behavior under the doc-example gate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs only, per the issue — the implementation stays untouched (it's right and load-bearing).
Before writing a word I verified the mechanism against source and a live probe:
src/vm.cre-collects all call-site arguments into a single list for a 1-parameter, non-defaulted callee in both the JIT fast path (:1801-1813) and the interpreter path (:1828-1844);one of [3, 4]→[3, 4],one of [3, 4, 5]→[3, 4, 5],one of []→[], identical underEIGS_JIT_OFF=1,--lintsilent — your reproduction exactly.What changed:
len of [1, 2]returning 2 depends on it) — plus your doc-gate example as a new executable SPEC example (the [89] gate now checks 72 examples, was 71; the new one passes).f of []half of the exception under Default parameter values.Item 4 of the issue's fix list (extending W017's hint) is a "consider" and a code change — left out of this docs PR deliberately; happy to take it separately if you want it.
Full suite green before and after: 3090/3090 baseline → 3091/3091 (exactly the one new doc example), doc-drift gates included.
Generated by Claude Fable 5 (brief, review), Claude Sonnet 4.6 (implementation)