-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add list-set! and nth-pair functions #269
- Loading branch information
Showing
7 changed files
with
77 additions
and
25 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,6 +221,7 @@ | |
The macro work similar to let* but variable is list of values and value | ||
need to evaluate to result of calling values.") | ||
|
||
;; ----------------------------------------------------------------------------- | ||
;; R7RS division operators (Gauche Scheme) BSD license | ||
;; Copyright (c) 2000-2020 Shiro Kawai <[email protected]> | ||
|
@@ -1452,6 +1453,13 @@ | |
obj | ||
(obj.clone false))) | ||
|
||
;; ----------------------------------------------------------------------------- | ||
(define (list-set! l k obj) | ||
"(list-set! list n) | ||
|
||
Returns n-th element of a list." | ||
(set-car! (%nth-pair "list-set!" l k) obj)) | ||
|
||
;; ----------------------------------------------------------------------------- | ||
(define-macro (define-record-type name constructor pred . fields) | ||
"(define-record-type name constructor pred . fields) | ||
|
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