diff options
author | elioat <elioat@tilde.institute> | 2022-11-22 18:29:07 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2022-11-22 18:29:07 -0500 |
commit | ecc8e346fd2d1ec5955dd9e5dce9bf7d1dca9930 (patch) | |
tree | c9f09b6cbe3f9d3afcd94b877a87cf4f0d31fb80 | |
parent | 61803a43b427fc9aee6e2b06c8d3e2902bf5adbb (diff) | |
download | tour-ecc8e346fd2d1ec5955dd9e5dce9bf7d1dca9930.tar.gz |
*
-rw-r--r-- | chibi/giblang.scm | 23 | ||||
-rw-r--r-- | rkt/giblang.rkt | 28 |
2 files changed, 51 insertions, 0 deletions
diff --git a/chibi/giblang.scm b/chibi/giblang.scm new file mode 100644 index 0000000..d07e765 --- /dev/null +++ b/chibi/giblang.scm @@ -0,0 +1,23 @@ +; chibi stuff +(import (scheme base) + (scheme write) + (srfi 101)) + +(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)))) + +(display (select-random-element vowels)) \ No newline at end of file diff --git a/rkt/giblang.rkt b/rkt/giblang.rkt new file mode 100644 index 0000000..9f29e92 --- /dev/null +++ b/rkt/giblang.rkt @@ -0,0 +1,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) \ No newline at end of file |