@@ -8,28 +8,23 @@ navhome: /docs/
9Alphabetic order
9Alphabetic order
11−Computes whether `a` and `b` are in alphabetical order, producing a
11+Computes whether `a` and `b` are in alphabetical order, producing a flag.
14−Accepts
13+#### Accepts
17`a` is a noun.
15`a` is a noun.
19`b` is a noun.
17`b` is a noun.
21−Produces
19+#### Produces
24−A boolean atom.
21+A flag.
30− ++ aor :: a-order
25+ ++ aor
32− |= {a/* b/*}
27+ |= [a=* b=*]
34 ?: =(a b) &
29 ?: =(a b) &
35 ?. ?=(@ a)
30 ?. ?=(@ a)
@@ -44,24 +39,32 @@ Source
44 $(a (rsh 3 1 a), b (rsh 3 1 b))
39 $(a (rsh 3 1 a), b (rsh 3 1 b))
48−Examples
42+#### Examples
51 > (aor 'a' 'b')
44 > (aor 'a' 'b')
53 > (aor 'b' 'a')
47 > (aor 'b' 'a')
55 > (aor "foo" "bar")
53 > (aor "foo" "bar")
57 > (aor "bar" "foo")
56 > (aor "bar" "foo")
59 > (aor "abcdefz" "abcdefa")
59 > (aor "abcdefz" "abcdefa")
61 > (aor "abcdefa" "abcdefz")
62 > (aor "abcdefa" "abcdefz")
63 > (aor 10.000 17.000)
65 > (aor 10.000 17.000)
65 > (aor 10 9)
68 > (aor 10 9)
@@ -72,27 +75,23 @@ Examples
73Numeric order
76Numeric order
75−Computes whether `a` and `b` are in ascending numeric order, producing a
78+Computes whether `a` and `b` are in ascending numeric order, producing a flag.
78−Accepts
80+#### Accepts
81`a` is a noun.
82`a` is a noun.
83`b` is a noun.
84`b` is a noun.
85−Produces
86+#### Produces
88−A boolean atom.
88+A flag.
93− ++ dor :: d-order
92+ ++ dor
95− |= {a/* b/*}
94+ |= [a=* b=*]
97 ?: =(a b) &
96 ?: =(a b) &
98 ?. ?=(@ a)
97 ?. ?=(@ a)
@@ -104,20 +103,24 @@ Source
104 (lth a b)
103 (lth a b)
107−Examples
106+#### Examples
110 > (dor 1 2)
108 > (dor 1 2)
112 > (dor 2 1)
111 > (dor 2 1)
114 > (dor ~[1 2 3] ~[1 2 4])
114 > (dor ~[1 2 3] ~[1 2 4])
116 > (dor ~[1 2 4] ~[1 2 3])
117 > (dor ~[1 2 4] ~[1 2 3])
118− > (dor (limo ~[99 100 10.000]) ~[99 101 10.000])
120+ > (dor `(list @)`~[99 100 10.000] ~[99 101 10.000])
120− > (dor ~[99 101 10.999] (limo ~[99 100 10.000]))
123+ > (dor ~[99 101 10.999] `(list @)`~[99 100 10.000])
@@ -127,26 +130,26 @@ Examples
128Hash order
131Hash order
130−XX revisit
133+Computes whether the products of `a` and `b` hashed with `mug` are in
134+ascending numeric order, producing a flag.
136+[`mug`](../2e) is the the 31-bit nonzero FNV-1a hash algorithm.
132−Accepts
138+#### Accepts
135`a` is a noun.
140`a` is a noun.
137`b` is a noun.
142`b` is a noun.
139−Produces
144+#### Produces
142−A boolean atom.
146+A flag.
144−Source
148+#### Source
147− ++ gor :: g-order
150+ ++ gor
149− |= {a/* b/*}
152+ |= [a=* b=*]
151 =+ [c=(mug a) d=(mug b)]
154 =+ [c=(mug a) d=(mug b)]
152 ?: =(c d)
155 ?: =(c d)
@@ -154,29 +157,39 @@ Source
154 (lth c d)
157 (lth c d)
157−Examples
160+#### Examples
160 > (gor 'd' 'c')
162 > (gor 'd' 'c')
165 > `@ud`'d'
171 > `@ud`'d'
167 > `@ud`'c'
174 > `@ud`'c'
169− > (mug 'd')
177+ > (mug 'd')
170 1.628.185.714
178 1.628.185.714
171 > (mug 'c')
180 > (mug 'c')
172 1.712.073.811
181 1.712.073.811
173 > (gor 'd' 'c')
183 > (gor 'd' 'c')
175 > (gor 'c' 'd')
186 > (gor 'c' 'd')
177 > (gor "foo" "bar")
189 > (gor "foo" "bar")
179− > (gor (some 10) (limo [1 2 3 ~]))
192+ > (gor (some 10) `(list @)`[1 2 3 ~])
@@ -184,31 +197,33 @@ Examples
185### `++hor`
198### `++hor`
187−Hash order
200+Head/tail hash order
202+If `a` and `b` are cells, `hor` checks to see if their heads are equal. If their
203+heads are equal, `gor` is computed on their tails, producing a flag. If their
204+heads are not equal, `gor` is computed on their heads, producing a flag.
189−XX revisit
206+If `a` and `b` are atoms, they are computed as samples of `gor`, producing a
191−Recursive hash comparator gate.
209+If `a` is an atom and `b` is not, then `%.y` is produced. If `b` is an atom and
210+`a` is not, `%.n` is produced.
193−Accepts
212+#### Accepts
196`a` is a noun.
214`a` is a noun.
198`b` is a noun.
216`b` is a noun.
200−Produces
218+#### Produces
203−A boolean atom.
220+A flag.
209− ++ hor :: h-order
224+ ++ hor
211− |= {a/* b/*}
226+ |= [a=* b=*]
213 ?: ?=(@ a)
228 ?: ?=(@ a)
214 ?. ?=(@ b) &
229 ?. ?=(@ b) &
@@ -217,46 +232,135 @@ Source
217 ?: =(-.a -.b)
232 ?: =(-.a -.b)
218 (gor +.a +.b)
233 (gor +.a +.b)
219 (gor -.a -.b)
234 (gor -.a -.b)
223−Examples
237+#### Examples
226 > (hor . 1)
239 > (hor . 1)
228 > (hor 1 2)
242 > (hor 1 2)
230 > (hor "abc" "cba")
245 > (hor "abc" "cba")
232 > (hor 'c' 'd')
248 > (hor 'c' 'd')
257+ > (hor 500.000.000 "foo")
260+ > (hor "foo" 500.000.000)
266+ > (gor `(list @)`[0 ~] 1)
269+ > (hor `(list @)`[50 500 5.000 ~] 1)
279+Computes whether the corresponding legs of `a` and `b` are in ascending
280+numeric order, producing a flag.
315+ > (lor 9 [1 2]) :: lor computes cells as greater than atoms
318+ > (lor `(list @)`[1 2 3 ~] `(list @)`[1 2 3 4 ~])
321+ > (lor `(list @)`[1 2 3 ~] `(list @)`[1 2 2 ~])
324+ > (lor `(list @)`[1 2 3 ~] `(list @)`[2 2 ~])
327+ > (lor [2 2 5] [1 5 9 8])
330+ > (lor [1 4 8] [1 5 9 8])
333+ > (lor [1 2 3] [1 2])
238### `++vor`
339### `++vor`
240−Double hash comparator gate.
341+Double hash order
343+Computes whether the products of `a` and `b` double-hashed with `mug` are in
344+ascending numeric order, producing a flag.
346+[`mug`](../2e) is the the 31-bit nonzero FNV-1a hash algorithm.
244−Accepts
349+#### Accepts
247`a` is a noun
351`a` is a noun
249`b` is a noun
353`b` is a noun
251−Produces
355+#### Produces
257− ++ vor :: v-order
361+ ++ vor
259− |= {a/* b/*}
363+ |= [a=* b=*]
261 =+ [c=(mug (mug a)) d=(mug (mug b))]
365 =+ [c=(mug (mug a)) d=(mug (mug b))]
262 ?: =(c d)
366 ?: =(c d)
@@ -264,13 +368,20 @@ Source
264 (lth c d)
368 (lth c d)
267−Examples
371+#### Examples
270 > (vor 'f' 'g')
373 > (vor 'f' 'g')
376+ > [(mug 'f') (mug 'g')]
377+ [1.661.740.952 1.644.963.335]
379+ > [(mug (mug 'f')) (mug (mug 'g'))]
380+ [261.421.509 1.861.258.547]
272 > (vor 'a' 'z')
382 > (vor 'a' 'z')
274 > (vor 43.326 41.106)
385 > (vor 43.326 41.106)