Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

659 lines (646 sloc) 7.912 kb
SECTION(2 1)
SECTION(3 4)
#<procedure #2 boolean?>
#<procedure #3 char?>
#<procedure #4 null?>
#<procedure #5 number?>
#<procedure #6 pair?>
#<procedure #7 procedure?>
#<procedure #8 string?>
#<procedure #9 symbol?>
#<procedure #10 vector?>
(#t #f #f #f #f #f #f #f #f)#t
(#t #f #f #f #f #f #f #f #f)#f
(#f #t #f #f #f #f #f #f #f)#\a
(#f #f #t #f #f #f #f #f #f)()
(#f #f #f #t #f #f #f #f #f)9739
(#f #f #f #f #t #f #f #f #f)(test)
(#f #f #f #f #f #t #f #f #f)#<procedure #11 record-error>
(#f #f #f #f #f #f #t #f #f)"test"
(#f #f #f #f #f #f #t #f #f)""
(#f #f #f #f #f #f #f #t #f)test
(#f #f #f #f #f #f #f #f #t)#()
(#f #f #f #f #f #f #f #f #t)#(a b c)
SECTION(4 1 2)
==> 'a
==> 'a
SECTION(4 1 3)
==> 12
SECTION(4 1 4)
==> 8
==> 3
==> 10
==> (3 4 5 6)
==> (5 6)
SECTION(4 1 5)
==> yes
==> no
==> 1
SECTION(4 1 6)
==> 3
==> 5
SECTION(4 2 1)
==> greater
==> equal
==> 2
==> composite
==> consonant
==> #t
==> #f
==> (f g)
==> #t
==> #t
==> #t
==> #f
==> #f
==> (b c)
SECTION(4 2 2)
==> 6
==> 35
==> 70
==> #t
==> 5
==> 34
==> 6
==> 34
==> 7
==> 34
==> 8
==> 34
==> 9
==> 34
==> 10
==> 34
SECTION(4 2 3)
==> 6
SECTION(4 2 4)
==> #(0 1 2 3 4)
==> 25
==> 1
==> ((6 1 3) (-5 -2))
==> -1
SECTION(4 2 6)
==> (list 3 4)
==> (list a 'a)
==> (a 3 4 5 6 b)
==> ((foo 7) . cons)
==> #(10 5 2 4 3 8)
==> 5
==> (a `(b ,(+ 1 2) ,(foo 4 d) e) f)
==> (a `(b ,x ,'y d) e)
==> (list 3 4)
==> `(list ,(+ 1 2) 4)
SECTION(5 2 1)
==> 6
==> 1
==> (3 6)
==> 9
SECTION(5 2 2)
==> 45
==> 5
==> 34
==> 5
==> 34
==> 88
==> 4
==> 34
==> 99
==> 77
SECTION(6 1)
==> #f
==> #f
==> #f
==> #t
==> #f
==> #f
==> #f
SECTION(6 2)
==> #t
==> #f
==> #t
==> #t
==> #t
==> #f
==> #f
==> #f
==> #t
==> #t
==> #f
==> #f
==> #t
==> #f
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
SECTION(6 3)
==> (a b c d e)
==> #t
==> (a . 4)
==> #t
==> (a b c . d)
==> #f
==> #f
==> (a)
==> ((a) b c d)
==> ("a" b c)
==> (a . 3)
==> ((a b) . c)
==> a
==> (a)
==> 1
==> (b c d)
==> 2
==> (a 7 c)
==> ()
==> 3
==> 3
==> 0
==> (x y)
==> (a b c d)
==> (a (b) (c))
==> ()
==> (a b c . d)
==> a
==> (c b a)
==> ((e (f)) d (b c) a)
==> c
==> (a b c)
==> (b c)
==> #f
==> #f
==> ((a) c)
==> (101 102)
==> (a 1)
==> (b 2)
==> #f
==> #f
==> ((a))
==> (5 7)
SECTION(6 4)
==> #t
==> #t
==> #t
==> "flying-fish"
==> "martin"
==> "Malvina"
==> #t
==> "cb"
==> "ab"
==> ab
==> #t
==> #f
==> jollywog
SECTION(6 5 5)
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #f
==> #t
==> #t
==> #f
==> #f
==> #t
==> #f
==> #t
==> #t
==> #f
==> #t
==> #f
==> #t
==> #t
==> #f
==> #f
==> #t
==> #f
==> #f
==> #f
==> #t
==> #f
==> #f
==> #f
==> #t
==> #f
==> #t
==> #f
==> #f
==> #t
==> #f
==> #t
==> #t
==> #f
==> 38
==> -24
==> 7
==> 3
==> 0
==> 4
==> 1
==> -1
==> -3
==> 7
==> 7
==> 0
==> 5
==> -5
==> -5
==> 5
==> 1
==> 1
==> 3
==> -1
==> -3
==> 1
==> -1
==> -1
==> 0
==> 0
==> #t
==> #t
==> #t
==> #t
==> 4
==> 4
==> 4
==> 0
==> 288
==> 1
SECTION(6 5 9)
==> "0"
==> "100"
==> "100"
==> 100
==> 256
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
SECTION(6 6)
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #f
==> #f
==> #f
==> #t
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #t
==> #f
==> #t
==> #t
==> #f
==> #t
==> #f
==> #f
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #f
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #t
==> #f
==> #f
==> #t
==> #t
==> #t
==> #t
==> #f
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #t
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #\.
==> #\A
==> #\a
==> #\A
==> #\A
==> #\a
==> #\a
SECTION(6 7)
==> #t
==> "?**"
==> "abc"
==> ""
==> 3
==> #\a
==> #\c
==> 0
==> ""
==> ""
==> ""
==> "a"
==> "b"
==> "ab"
==> "foobar"
==> "foo"
==> "foo"
==> "foo"
==> ""
==> ""
==> #t
==> #f
==> #f
==> #t
==> #t
==> #t
==> #f
==> #f
==> #t
==> #t
==> #f
==> #f
==> #f
==> #t
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #t
==> #f
==> #t
==> #t
==> #f
==> #t
==> #f
==> #f
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #f
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #f
==> #t
==> #f
==> #f
==> #t
==> #t
==> #t
==> #t
==> #f
==> #t
==> #t
==> #f
==> #f
==> #f
==> #f
==> #t
==> #t
==> #t
SECTION(6 8)
==> #t
==> #(a b c)
==> #()
==> 3
==> 0
==> 8
==> #(0 ("Sue" "Sue") "Anna")
==> #(hi hi)
==> #()
==> #()
SECTION(6 9)
==> #t
==> #t
==> #f
==> #t
==> 7
==> 7
==> 17
==> ()
==> 30
==> (b e h)
==> (5 7 9)
==> (1 2 3)
==> (1 2 3)
==> (-1 -2 -3)
==> #(0 1 4 9 16)
==> -3
==> 4
==> #f
==> ()
SECTION(6 10 1)
==> #t
==> #t
==> #t
==> #t
SECTION(6 10 2)
==> #\;
==> #\;
==> (define cur-section '())
==> #\(
==> (define errs '())
SECTION(6 10 3)
==> #t
==> (define foo '(#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c)))
==> #t
==> #t
==> #t
==> #\;
==> #\;
==> #\;
==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
==> (define foo '(#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c)))
==> #t
==> (define foo '(#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c)))
==> #t
==> #t
==> #t
==> #\;
==> #\;
==> #\;
==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
==> (define foo '(#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c)))
Passed all tests
;testing inexact numbers;
SECTION(6 5 5)
==> #t
==> #t
==> 4.
==> 4.
==> -4.
==> -4.
==> -4.
==> 0.
==> 0.
==> 1.
==> 4.
==> 4.
==> 1
==> 0
==> #t
==> (define foo '(.25 -3.25))
==> #t
==> #t
==> #t
==> #\;
==> #\;
==> #\;
==> (.25 -3.25)
==> (define foo '(.25 -3.25))
==> #t
Passed all tests
SECTION(6 5 6)
==> #t
==> #t
==> #t
==> #t
==> #t
==> #t
;testing bignums;
SECTION(6 5 7)
==> 0
==> 0
==> 0
==> 0
==> 2
==> -1
==> 2
==> 2
==> 1
==> -2
==> -2
==> -2
==> 3
==> 33333333333333333330
==> 3
==> -3
==> -33333333333333333330
==> -3
==> 3
==> -3
==> 0
==> 0
==> 0
==> 0
==> 0
==> #t
==> #t
SECTION(6 5 8)
==> 281474976710655325431
==> "281474976710655325431"
Passed all tests
To fully test continuations, Scheme 4, and DELAY/FORCE do:
(test-cont) (test-sc4) (test-delay)
;testing continuations;
SECTION(6 9)
==> #t
==> #f
Passed all tests
;testing scheme 4 functions;
SECTION(6 7)
==> (#\P #\space #\l)
==> ()
==> "1\\\""
==> ""
SECTION(6 8)
==> (dah dah didah)
==> ()
==> #(dididit dah)
==> #()
SECTION(6 10 4)
==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
Passed all tests
;testing DELAY and FORCE;
SECTION(6 9)
==> 3
==> (3 3)
==> 2
==> 6
==> 6
==> 3
Passed all tests
Jump to Line
Something went wrong with that request. Please try again.