@@ -1,52 +1,31 @@
1−`^+ ketlus`
2−===========
1+# `:like`, `^+`, "ketlus", `{$like p/twig q/twig}`
32
43Cast `q` to an unbunted `p`.
54
65Casts `q` to the type of `p`, verifying that it contains
76the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
87cast to types that have previously been made into validator
9−functions (clams) with `$,`. For example, the arguments to a [`|=`]() are
10−automatically bunted with a [`=|`](), so `^+` is used. Most often we use `^+` to cast when our type is already defined by something inside our context.
8+functions (clams) with `$,`. For example, the arguments to a `|=` are
9+automatically bunted with a `=|`, so `^+` is used. Most often we use `^+` to cast when our type is already defined by something inside our context.
1110
12−Produces
13−--------
11+Regular form: *2 fixed*
1412
15−Twig: `[%ktls p=twig q=twig]`
16−
17−Sample
18−------
19−
20−`p` is a [`++twig`](). `q` is a twig.
21−
22−Tall form
23−---------
24−
25− ^+ p
26− q
27−
28−Wide form
29−---------
30−
31− ^+(p q)
32−
33−Examples
34−--------
13+Examples:
3514
3615 ~zod/try=> (add 90 7)
3716 97
3817 ~zod/try=> ^+('any text' (add 90 7))
3918 'a'
4019
41−Here we use a ['++cord']() (which could be any cord), `'any text'` to cast our
20+Here we use a '++cord' (which could be any cord), `'any text'` to cast our
4221result to a cord.
4322
44− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
23+ /~zod/try=> =cor |= a/{q/@ta r/@ s/@}
4524 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
4625 new var %cor
4726 /~zod/try=> (cor 'start' 6 3)
4827 [8.390.876.208.525.960.558 9 3]
49− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
28+ /~zod/try=> =cor |= a/[q/@ta r/@ s/@]
5029 ^+ a
5130 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
5231 changed %cor
@@ -60,8 +39,3 @@ the sum of the latter two as the second, and the differene as the third.
6039In the first call you can see that our type information is lost, and we
6140produce our cord as an atom. By adding a `^+ a` we cast the result to
6241our input, and type information is retained.
63−
64−Equivalent to
65−-------------
66−
67− ^-(_p q)