Created
March 18, 2022 16:19
-
-
Save sham1/35aa8cb90fccd77b26db17e23df46ff3 to your computer and use it in GitHub Desktop.
Revisions
-
sham1 created this gist
Mar 18, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ (import (scheme base) (scheme write)) (define-syntax destructuring-bind (syntax-rules () ((_ (name1 names ...) var body1 bodys ...) (apply (lambda (name1 names ...) body1 bodys ...) var)))) (destructuring-bind (a b c) '(1 2 3) (display "a: ") (display a) (newline) (display "b: ") (display b) (newline) (display "c: ") (display c) (newline))