You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
390 B
Plaintext
25 lines
390 B
Plaintext
2 years ago
|
use std.random randint
|
||
|
|
||
|
const ALPHABET = 26
|
||
|
|
||
|
function main() {
|
||
|
|
||
|
// generate a lot of words
|
||
|
map const x in 0..10000 into words {
|
||
|
let word = 0
|
||
|
let len = 0
|
||
|
let char = randint(ALPHABET)
|
||
|
|
||
|
while char != 0 {
|
||
|
word *= ALPHABET
|
||
|
word += char
|
||
|
len++
|
||
|
|
||
|
char = randint(ALPHABET)
|
||
|
}
|
||
|
|
||
|
yield word
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|