about summary refs log tree commit diff stats
path: root/js/games/nluqo.github.io/~bh/61a-pages/Lib/test.logo
diff options
context:
space:
mode:
Diffstat (limited to 'js/games/nluqo.github.io/~bh/61a-pages/Lib/test.logo')
-rw-r--r--js/games/nluqo.github.io/~bh/61a-pages/Lib/test.logo39
1 files changed, 39 insertions, 0 deletions
diff --git a/js/games/nluqo.github.io/~bh/61a-pages/Lib/test.logo b/js/games/nluqo.github.io/~bh/61a-pages/Lib/test.logo
new file mode 100644
index 0000000..bb2e15a
--- /dev/null
+++ b/js/games/nluqo.github.io/~bh/61a-pages/Lib/test.logo
@@ -0,0 +1,39 @@
+to second :thing
+op first bf :thing
+end
+
+to twice :thing
+pr :thing
+pr :thing
+end
+
+to pigl :word
+if vowelp first :word [op word :word "ay]
+op pigl word bf :word first :word
+end
+
+to vowelp :let
+op memberp :let "aeiou
+end
+
+to piglatin :sent
+if emptyp :sent [op []]
+op fput pigl first :sent piglatin bf :sent
+end
+
+to factorial :n
+if :n=0 [output 1]
+output :n * factorial :n-1
+end
+
+to memberp :thing :list
+if emptyp :list [op "false]
+if equalp :thing first :list [op "true]
+op memberp :thing bf :list
+end
+
+to repeat :num :instr
+if :num=0 [stop]
+run :instr
+repeat :num-1 :instr
+end