about summary refs log tree commit diff stats
path: root/rkt/giblang.rkt
blob: 9f29e92d8c9e42e08cc5987658b6c11f697ee04d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#lang racket

(define consonants
  (list 
   "b" "c" "d" "f"
   "g" "h" "j" "k"
   "l" "m" "n" "p"
   "r" "s" "t" "v"
   "w" "z" "ch" "sh"
   "zh" "th"))

(define vowels
  (list 
    "a" "e" "i" "o" 
    "u" "y" "ee" "ai" "ae"))

(define (select-random-element list)
  (list-ref list (random (length list))))

(define (word)
  (for/list ([i (random 3 5)])
  (display
   (select-random-element vowels))
  (display
   (select-random-element consonants))))


(word)