From 562a9a52d599d9a05f871404050968a5fd282640 Mon Sep 17 00:00:00 2001 From: elioat Date: Wed, 23 Aug 2023 07:52:19 -0400 Subject: * --- .../nluqo.github.io/~bh/61a-pages/Lectures/errors | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 js/games/nluqo.github.io/~bh/61a-pages/Lectures/errors (limited to 'js/games/nluqo.github.io/~bh/61a-pages/Lectures/errors') diff --git a/js/games/nluqo.github.io/~bh/61a-pages/Lectures/errors b/js/games/nluqo.github.io/~bh/61a-pages/Lectures/errors new file mode 100644 index 0000000..825b0ec --- /dev/null +++ b/js/games/nluqo.github.io/~bh/61a-pages/Lectures/errors @@ -0,0 +1,26 @@ + + +(define (list-of-squares nums) + (define (square (car nums)) + (* (car nums) (car nums))) + (if (null? nums) + nil + (cons (square (car nums)) + (list-of-squares (cdr nums))))) + + + + +(set! (cdr x) nil) + + + + + +(define (assq sym alis) + (cond ((null? alis) nil) + ((eq? sym (caar alis)) + (car alis)) + (else + (set! alis (cdr alis)) + (assq sym alis)))) -- cgit 1.4.1-2-gfad0