diff options
author | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2023-12-05 16:34:32 -0600 |
---|---|---|
committer | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2023-12-05 16:34:32 -0600 |
commit | 783fa44e5b1754586fce3f69ea89eca5b8d28170 (patch) | |
tree | 966ac8f71a828e2b56c1c385aebff197d98dd402 /chap5/part3.rkt | |
parent | a0b197cc68e42568aeadaf94d7ec631ffc4b3cca (diff) |
Diffstat (limited to 'chap5/part3.rkt')
-rw-r--r-- | chap5/part3.rkt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chap5/part3.rkt b/chap5/part3.rkt index 2fad35d..cf6cc92 100644 --- a/chap5/part3.rkt +++ b/chap5/part3.rkt @@ -143,6 +143,11 @@ (goto (reg continue)) append-done)) +(define (last-pair x) + (if (null? (cdr x)) + x + (last-pair (cdr x)))) + (#%provide append!) (define (append! x y) (set-cdr! (last-pair x) y) |