about summary refs log tree commit diff stats
path: root/js/baba-yaga/scratch/baba/nested_when_working.baba
diff options
context:
space:
mode:
Diffstat (limited to 'js/baba-yaga/scratch/baba/nested_when_working.baba')
-rw-r--r--js/baba-yaga/scratch/baba/nested_when_working.baba12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/baba-yaga/scratch/baba/nested_when_working.baba b/js/baba-yaga/scratch/baba/nested_when_working.baba
new file mode 100644
index 0000000..9552632
--- /dev/null
+++ b/js/baba-yaga/scratch/baba/nested_when_working.baba
@@ -0,0 +1,12 @@
+classify : n ->
+  with (
+    lo Int; hi Int;
+    lo : 10; hi : 100;
+  ) ->
+    when n is
+      0 then "zero"
+      _ then when (n > hi) is
+               true then "large"
+               _    then when (n > lo) is
+                          true then "medium"
+                          _    then "small";