a little scheme

This commit is contained in:
Geir Okkenhaug Jerstad 2024-08-20 19:10:43 +02:00
parent c43a63cc2e
commit 4a5b13324f
3 changed files with 1269 additions and 0 deletions

File diff suppressed because it is too large Load diff

11
little_schemer/tls.ss Normal file
View file

@ -0,0 +1,11 @@
(define atom?
(lambda (x)
(and (not (pair? x)) (not (null? x)))))
(define add1
(lambda (x)
(+ x 1)))
(define sub1
(lambda (x)
(- x 1)))

View file

@ -14,5 +14,16 @@
(lambda (a b c)
(+ a b c)))
(define add1
(lambda (a)
(+ a 1)))
(define sub1
(lambda (b)
(- b 1)))
(display(string-append "sub1 to 2 is " (number->string(sub1 2)) "\n"))
;; display message on screen
(display "Hello World!")