This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
forked from Chia-Network/clvm_tools_rs
-
Notifications
You must be signed in to change notification settings - Fork 9
20230720 call with rest #198
Merged
prozacchiwawa
merged 28 commits into
20230421-nightly-rebuild
from
20230720-call-with-rest
Aug 1, 2023
Merged
20230720 call with rest #198
prozacchiwawa
merged 28 commits into
20230421-nightly-rebuild
from
20230720-call-with-rest
Aug 1, 2023
Conversation
This file contains 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
Merged
prozacchiwawa
merged commit Aug 1, 2023
fcd9e19
into
20230421-nightly-rebuild
20 of 21 checks passed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds an
&rest
keyword to function argument lists. It specifies that the runtime value that follows will be used to providethe rest of the argument list to this function as though each left subtree was specified as a separate argument and its tail
value would be captured by an improper tail argument in the same position.
&rest fills unspecified arguments with a runtime value:
in
(defun F (A B . C) ...)
called like(F &rest (list 101 103 105 109))
, the body of F receivesA = 101, B = 103, C = (105 109)
.in
(defun F (A B . C) ...)
called like(F 13 &rest (list 101 103 105 109))
, the body of F receivesA = 13, B = 101, C = (103 105 109)
.in
(defun F (A B . C) ...)
called like(F 13 15 19 &rest (list 101 103))
, the body of F receivesA = 13, B = 15, C = (19 101 103)
.See https://github.com/Chia-Network/clvm_tools_rs/blob/20230720-call-with-rest/src/tests/compiler/restargs.rs for examples.
Will likely backport this and put a PR in at the base level as well.