diff options
Diffstat (limited to 'js/games/nluqo.github.io/~bh/61a-pages/Lectures/1.1/pigl.scm')
-rw-r--r-- | js/games/nluqo.github.io/~bh/61a-pages/Lectures/1.1/pigl.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/games/nluqo.github.io/~bh/61a-pages/Lectures/1.1/pigl.scm b/js/games/nluqo.github.io/~bh/61a-pages/Lectures/1.1/pigl.scm new file mode 100644 index 0000000..7957fc8 --- /dev/null +++ b/js/games/nluqo.github.io/~bh/61a-pages/Lectures/1.1/pigl.scm @@ -0,0 +1,10 @@ +(define (pigl wd) + (if (pl-done? wd) + (word wd 'ay) + (pigl (word (bf wd) (first wd))))) + +(define (pl-done? wd) + (vowel? (first wd))) + +(define (vowel? letter) + (member? letter '(a e i o u))) |