@@ -1,52 +1,31 @@
1−`^+ ketlus`
1+# `:like`, `^+`, "ketlus", `{$like p/twig q/twig}`
4Cast `q` to an unbunted `p`.
3Cast `q` to an unbunted `p`.
6Casts `q` to the type of `p`, verifying that it contains
5Casts `q` to the type of `p`, verifying that it contains
7the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
6the type of `q`. Similar to `^+`, but doesn't bunt `p`. Used to
8cast to types that have previously been made into validator
7cast to types that have previously been made into validator
9−functions (clams) with `$,`. For example, the arguments to a [`|=`]() are
8+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.
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.
12−Produces
11+Regular form: *2 fixed*
15−Twig: `[%ktls p=twig q=twig]`
20−`p` is a [`++twig`](). `q` is a twig.
36 ~zod/try=> (add 90 7)
15 ~zod/try=> (add 90 7)
38 ~zod/try=> ^+('any text' (add 90 7))
17 ~zod/try=> ^+('any text' (add 90 7))
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
42result to a cord.
21result to a cord.
44− /~zod/try=> =cor |= a=[q=@ta r=@ s=@]
23+ /~zod/try=> =cor |= a/{q/@ta r/@ s/@}
45 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
24 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
46 new var %cor
25 new var %cor
47 /~zod/try=> (cor 'start' 6 3)
26 /~zod/try=> (cor 'start' 6 3)
48 [8.390.876.208.525.960.558 9 3]
27 [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/@]
51 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
30 [(cat 3 'new' q.a) (add r.a s.a) (sub r.a s.a)]
52 changed %cor
31 changed %cor
@@ -60,8 +39,3 @@ the sum of the latter two as the second, and the differene as the third.
60In the first call you can see that our type information is lost, and we
39In the first call you can see that our type information is lost, and we
61produce our cord as an atom. By adding a `^+ a` we cast the result to
40produce our cord as an atom. By adding a `^+ a` we cast the result to
62our input, and type information is retained.
41our input, and type information is retained.