diff options
| author | 2024-09-14 12:11:33 -0400 | |
|---|---|---|
| committer | 2024-09-14 12:11:33 -0400 | |
| commit | 1fb756d647663737385080b5579a218687e88828 (patch) | |
| tree | d123da44f5960199fcb84b01fa6b590010fd1653 /toplevel.scm | |
| parent | continuously generate a bible (diff) | |
use a better random number generator from CHICKEN
Diffstat (limited to 'toplevel.scm')
| -rw-r--r-- | toplevel.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/toplevel.scm b/toplevel.scm index 763eaf5..9fa11bd 100644 --- a/toplevel.scm +++ b/toplevel.scm @@ -37,10 +37,13 @@ (thread-sleep! time) (cond ((equal? previous-word "startofbook") - (printf "THE BOOK OF ~A~%~%~%" (generate-next-word table "of")) - (printf "~A:1:1" (+ book 1)) - (generate-continuously* (generate-next-word table "startofverse") - time (+ 1 book) 1 1)) + (let ((next-word (generate-next-word table "of"))) + (if (equal? next-word "the") + (set! next-word (generate-next-word table "the"))) + (printf "THE BOOK OF ~A~%~%~%" next-word) + (printf "~A:1:1" (+ book 1)) + (generate-continuously* (generate-next-word table "startofverse") + time (+ 1 book) 1 1))) ((equal? previous-word "startofchapter") (printf "~%~%~A:~A:1" book (+ 1 chapter)) (generate-continuously* (generate-next-word table "startofverse") |
