Repository navigation
Conversation
The existing tests check that a definition keeps the meaning its words had when it was defined, but only for user-defined words. Add the same checks for built-in words. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
rabestro
force-pushed
the
forth-builtin-word-binding
branch
from
November 12, 2026 10:12
7e60ec3 to
9b65f28
Compare
glennj
reviewed
Nov 12, 2026
Comment on lines
+527
to
+533
| "instructions": [ | ||
| ": sum + ;", | ||
| ": + * ;", | ||
| "2 3 sum" | ||
| ] | ||
| }, | ||
| "expected": [5] |
Contributor
There was a problem hiding this comment.
2 5 sum 2 5 + with expected [7, 10] would be a bit more illustrative.
glennj
approved these changes
Nov 12, 2026
Member
|
Please follow the standard process of opening a forum thread to discuss problem spec changes first. Problem spec PRs should only be opened after three maintainers have given approval on the forum. |
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.
The existing tests check that a definition keeps the meaning its words had when it was defined, but only for user-defined words:
: foo 5 ;: bar foo ;: foo 6 ;bar foo→[5, 6]: foo 10 ;: foo foo 1 + ;foo→[11]Nothing checks the same rule for built-in words. A solution that expands user-defined words at definition time but leaves built-ins as names to look up later passes the whole suite, yet:
: sum + ;: + * ;2 3 sumgives[6]instead of[5]: dup dup dup ;1 dupnever terminates, becausedupkeeps expanding into itselfThis PR adds those two cases, next to the two existing ones.
Notes:
Related: #1800, https://forum.exercism.org/t/forth-test-suite-may-not-be-complete/11676
🤖 Generated with Claude Code