@@ -1,56 +1,21 @@
1−`?+ wutlus`
2−====
1+# `:defl`, `?+`, "wutlus" `{$deft p/wing q/twig r/(list (pair twig twig))}`
32
4−Switch w/default value.
3+Switch with default value.
54
6−Identical to [`?-`]() except for that it takes a default case `q` if none of the cases in `r` match the type of `p`. More specifically, the labels in `q` must match the [span]() of `p`. `q` must be terminated with a `==`.
5+Identical to `?-` except for that it takes a default case `q` if none of the
6+cases in `r` match the type of `p`. More specifically, the labels in `q` must
7+match the span of `p`. As with `?-`, the most common type used to switch on is the cube, which begins with `%` followed by text.
78
8−As with `?-`, the most common type used to switch on is the [cube](), which begins with `%` followed by text.
9+Examples:
910
10−Produces
11−--------
12−
13−Twig: `[%wtls p=wing q=twig r=tine]`
14−
15−Accepts
16−-------
17−
18−`p` is a [`++wing`](). `q` is a [`++twig`](). `r` is a [`++tine`]().
19−
20−Tall form
21−---------
22−
23−Kingside:
24−
25− ?+ p
26− q
11+ ?- p
2712 p.i.r q.i.r
2813 p.i.t.r q.i.t.r
2914 p.i.t.t.r q.i.t.t.r
15+ * q
3016 ==
31−
32−Queenside:
33−
34− ?+ p
35− q
36− p.i.r
37− q.i.r
38− p.i.t.r
39− q.i.t.r
40− p.i.t.t.r
41− q.i.t.t.r
42− ==
43−
44−Wide form
45−---------
46−
47− ?+(p q p.i.r q.i.r, p.i.t.r q.i.t.r, p.i.t.t.r q.i.t.t.r)
48−
49−Examples
50−--------
51−
5217 ~zod/try=>
53− =cor |= typ=@ta
18+ =cor |= typ/@ta
5419 ?+ typ 0
5520 %a 1
5621 %b 2
@@ -64,7 +29,7 @@ Examples
6429 0
6530
6631Here is a simple example of `?+` showing that although the cases must
67−match the [span]() of its input, all possible cases don't need to be covered
32+match the span of its input, all possible cases don't need to be covered
6833since `?+` has a default case. We create a core, `cor` that takes an
6934input `typ`, a `@ta`. Calling `cor` selects one of our cases when it is
7035covered, or the default.
@@ -92,13 +57,3 @@ covered, or the default.
9257
9358This example shows how `?+` can fail. Our input span must match the span
9459of our cases.
95−
96−Equivalent to
97−-------------
98−
99− ?- p
100− p.i.r q.i.r
101− p.i.t.r q.i.t.r
102− p.i.t.t.r q.i.t.t.r
103− * q
104− ==