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 } }