public
Description: Tiny Scheme interpreter, suitable for use as a livecoded demo
Homepage:
Clone URL: git://github.com/jcoglan/stickup.git
stickup / test.scm
100644 18 lines (12 sloc) 0.218 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(define (fact x)
  (if (= x 0)
      1
      (* x (fact (- x 1)))))
 
(display (fact 6))
 
(define (add x)
  (lambda (y)
    (+ x y)))
 
(define add4 (add 4))
(define add5 (add 5))
 
(display (add4 3))
(display (add5 3))