Artifact
483d3d1c0b4bb2da24fbdfc07f44a9ca62138055:
- File
srfi/tests/random.sps
— part of check-in
[80c8c83034]
at
2016-07-07 18:11:39
on branch trunk
— initial import
(user:
ovenpasta@pizzahack.eu
size: 518)
0000: 3b 3b 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 ;; Copyright (c)
0010: 20 32 30 30 39 20 44 65 72 69 63 6b 20 45 64 64 2009 Derick Edd
0020: 69 6e 67 74 6f 6e 2e 20 20 41 6c 6c 20 72 69 67 ington. All rig
0030: 68 74 73 20 72 65 73 65 72 76 65 64 2e 20 20 4c hts reserved. L
0040: 69 63 65 6e 73 65 64 20 75 6e 64 65 72 20 61 6e icensed under an
0050: 0a 3b 3b 20 4d 49 54 2d 73 74 79 6c 65 20 6c 69 .;; MIT-style li
0060: 63 65 6e 73 65 2e 20 20 4d 79 20 6c 69 63 65 6e cense. My licen
0070: 73 65 20 69 73 20 69 6e 20 74 68 65 20 66 69 6c se is in the fil
0080: 65 20 6e 61 6d 65 64 20 4c 49 43 45 4e 53 45 20 e named LICENSE
0090: 66 72 6f 6d 20 74 68 65 20 6f 72 69 67 69 6e 61 from the origina
00a0: 6c 0a 3b 3b 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 l.;; collection
00b0: 74 68 69 73 20 66 69 6c 65 20 69 73 20 64 69 73 this file is dis
00c0: 74 72 69 62 75 74 65 64 20 77 69 74 68 2e 20 20 tributed with.
00d0: 49 66 20 74 68 69 73 20 66 69 6c 65 20 69 73 20 If this file is
00e0: 72 65 64 69 73 74 72 69 62 75 74 65 64 20 77 69 redistributed wi
00f0: 74 68 0a 3b 3b 20 73 6f 6d 65 20 6f 74 68 65 72 th.;; some other
0100: 20 63 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6d 79 20 collection, my
0110: 6c 69 63 65 6e 73 65 20 6d 75 73 74 20 61 6c 73 license must als
0120: 6f 20 62 65 20 69 6e 63 6c 75 64 65 64 2e 0a 0a o be included...
0130: 23 21 72 36 72 73 0a 28 69 6d 70 6f 72 74 20 28 #!r6rs.(import (
0140: 72 6e 72 73 29 20 28 73 75 72 66 61 67 65 20 73 rnrs) (surfage s
0150: 32 37 20 72 61 6e 64 6f 6d 2d 62 69 74 73 29 29 27 random-bits))
0160: 0a 0a 28 64 6f 20 28 28 69 20 30 20 28 2b 20 69 ..(do ((i 0 (+ i
0170: 20 31 29 29 29 0a 20 20 28 28 3d 20 69 20 31 30 1))). ((= i 10
0180: 29 20 27 64 6f 6e 65 29 0a 20 20 28 64 69 73 70 ) 'done). (disp
0190: 6c 61 79 20 28 72 61 6e 64 6f 6d 2d 69 6e 74 65 lay (random-inte
01a0: 67 65 72 20 31 30 30 29 29 0a 20 20 28 6e 65 77 ger 100)). (new
01b0: 6c 69 6e 65 29 29 0a 0a 28 64 6f 20 28 28 69 20 line))..(do ((i
01c0: 30 20 28 2b 20 69 20 31 29 29 29 0a 20 20 28 28 0 (+ i 1))). ((
01d0: 3d 20 69 20 31 30 29 20 27 64 6f 6e 65 29 0a 20 = i 10) 'done).
01e0: 20 28 64 69 73 70 6c 61 79 20 28 72 61 6e 64 6f (display (rando
01f0: 6d 2d 72 65 61 6c 29 29 0a 20 20 28 6e 65 77 6c m-real)). (newl
0200: 69 6e 65 29 29 0a ine)).