Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #lang racket
- (define (find word time)
- (cond ((= time 0) (first word))
- (else (find (cdr word) (- time 1)))))
- (define words
- (file->lines "words.txt"))
- (define (main y z)
- (cond ((= y 0) (printf "God says... ~s" z))
- ((= y 1) (main (- y 1) (string-append z (find words (random (length words))))))
- (else (main (- y 1) (string-append z (string-append (find words (random (length words))) " "))))))
- (main 32 "")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement