Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Odd-word-problem/Scheme/odd-word-problem.ss
Normal file
19
Task/Odd-word-problem/Scheme/odd-word-problem.ss
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
(define (odd)
|
||||
(let ((c (read-char)))
|
||||
(if (char-alphabetic? c)
|
||||
(let ((r (odd)))
|
||||
(write-char c)
|
||||
r)
|
||||
(lambda () (write-char c) (char=? c #\.)))))
|
||||
|
||||
(define (even)
|
||||
(let ((c (read-char)))
|
||||
(write-char c)
|
||||
(if (char-alphabetic? c)
|
||||
(even)
|
||||
(char=? c #\.))))
|
||||
|
||||
(let loop ((i #f))
|
||||
(if (if i ((odd)) (even))
|
||||
(exit)
|
||||
(loop (not i))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue