main.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(define list '(d u r a l e x))

(define (contains list x)
    (cond 
        ((null? list) #f)
        ((eq? (car list) x) #t)
        (else (contains (cdr list) x))))
    

(define x 'x)
(display "list ")
(display (if (contains list x)
            "contains "
            "does not contain "))
(display x)
(newline)


(define y 'y)
(display "list ")
(display (if (contains list y)
            "contains "
            "does not contain "))
(display y)
(newline)
BiwaScheme Interpreter version 0.6.4 Copyright (C) 2007-2014 Yutaka HARA and the BiwaScheme team