summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-12-14 23:09:02 -0800
committerKeith Packard <keithp@keithp.com>2017-12-14 23:09:02 -0800
commita4c9233aa8a2f1b1dca6580d6d6275b48c40f01f (patch)
tree6a1d5ae04d92e230ebc8291ed95bd929030289b7
parent32f6877288ea6b7eb1cae9a42fbe8e2c5dbb2f08 (diff)
altos/lambdakey-v1.0: shrink scheme code to fit the ROM
scheme has grown a bit; adapt Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/lambdakey-v1.0/ao_lambdakey_const.scheme24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/lambdakey-v1.0/ao_lambdakey_const.scheme b/src/lambdakey-v1.0/ao_lambdakey_const.scheme
index d0c0e578..50373272 100644
--- a/src/lambdakey-v1.0/ao_lambdakey_const.scheme
+++ b/src/lambdakey-v1.0/ao_lambdakey_const.scheme
@@ -100,8 +100,6 @@
(define (cdar l) (cdr (car l)))
-(define (caddr l) (car (cdr (cdr l))))
-
; (if <condition> <if-true>)
; (if <condition> <if-true> <if-false)
@@ -192,23 +190,14 @@
(define (list-tail a b)
(if (zero? b)
a
- (list-tail (cdr a (- b 1)))
- )
+ (list-tail (cdr a) (- b 1))
+ )
)
(define (list-ref a b)
(car (list-tail a b))
)
-(define (list-tail a b)
- (if (zero? b)
- a
- (list-tail (cdr a) (- b 1))))
-
-(list-tail '(1 2 3) 2)
-
-(define (list-ref a b) (car (list-tail a b)))
-
(list-ref '(1 2 3) 2)
@@ -346,9 +335,6 @@
(define string (lambda a (list->string a)))
-(display "apply\n")
-(apply cons '(a b))
-
(define map
(lambda (a . b)
(define (args b)
@@ -378,12 +364,6 @@
(map cadr '((a b) (d e) (g h)))
-(define for-each (lambda (a . b)
- (apply map a b)
- #t))
-
-(for-each display '("hello" " " "world" "\n"))
-
(define (newline) (write-char #\newline))
(newline)