a little scheme
This commit is contained in:
parent
c43a63cc2e
commit
4a5b13324f
1247
little_schemer/the-little-schemer.rkt
Normal file
1247
little_schemer/the-little-schemer.rkt
Normal file
File diff suppressed because it is too large
Load diff
11
little_schemer/tls.ss
Normal file
11
little_schemer/tls.ss
Normal 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)))
|
|
@ -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!")
|
||||
|
||||
|
|
Loading…
Reference in a new issue