refactor: change onType to match and take only one pattern and result #22

Merged
glen merged 1 commit from match_syntax into main 2025-04-22 05:01:22 +00:00
Owner

Pursuant to #12. Doesn't quite fully resolve it, because there is still the question of whether match(...) can be left out for a behavior that literally matches anything (current behavior), or whether match(Passthru, behavior) should be required for such cases.

Pursuant to #12. Doesn't quite fully resolve it, because there is still the question of whether `match(...)` can be left out for a behavior that literally matches anything (current behavior), or whether `match(Passthru, behavior)` should be required for such cases.
glen added 1 commit 2025-04-22 04:57:54 +00:00
refactor: change onType to match and take only one pattern and result
All checks were successful
/ test (pull_request) Successful in 17s
92e232e06d
Author
Owner

(Oh, and in place of an onType with lots of alternating PATTERN, VALUE, PATTERN, VALUE arguments, one now exports an array of match(PATTERN, VALUE) items.)

(Oh, and in place of an onType with lots of alternating PATTERN, VALUE, PATTERN, VALUE arguments, one now exports an array of `match(PATTERN, VALUE)` items.)
glen merged commit 236f46c0c0 into main 2025-04-22 05:01:22 +00:00
glen deleted branch match_syntax 2025-04-22 05:01:22 +00:00
Sign in to join this conversation.
No reviewers
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: StudioInfinity/nanomath#22
No description provided.