@@ -10,30 +10,26 @@ Add
1010
1111Produces the sum of `a` and `b`.
1212
13−Accepts
14−-------
13+#### Accepts
1514
1615`a` is an atom.
1716
1817`b` is an atom.
1918
20−Produces
21−--------
19+#### Produces
2220
2321An atom.
2422
25−Source
26−------
23+#### Source
2724
28− ++ add
25+ ++ add
2926 ~/ %add
3027 |= [a=@ b=@]
3128 ^- @
3229 ?: =(0 a) b
3330 $(a (dec a), b +(b))
34−::
35−Examples
36−--------
31+
32+#### Examples
3733
3834 > (add 2 2)
3935 4
@@ -44,15 +40,15 @@ Examples
4440 > (add 1.333 (mul 2 2))
4541 1.337
4642
47− > `@`'a' ::`'a'` is an atom represented as a different data type.
48− 97 We cast it to the aura `@` to see what its integer representation is.
4943 > (add 'a' 4)
5044 101
51− (add 'a' 'b')
45+
46+ > (add 'a' 'b')
5247 195
5348
54− > (add 0xc 0xf) ::`0xc` and `0xf` are of the hexadecimal soft atom type (`@ux`).
49+ > (add 0xc 0xf)
5550 27
51+
5652 > `@ux`(add 0xc 0xf)
5753 0x1b
5854
@@ -63,31 +59,27 @@ Decrement
6359
6460Decrements `a` by `1`.
6561
66−Accepts
67−-------
62+#### Accepts
6863
6964`a` is an atom.
7065
71−Produces
72−--------
66+#### Produces
7367
7468An atom.
7569
76−Source
77−------
70+#### Source
7871
79− ++ dec
72+ ++ dec
8073 ~/ %dec
8174 |= a=@
82− ~_ leaf+"decrement-underflow"
75+ ~| %decrement-underflow
8376 ?< =(0 a)
8477 =+ b=0
8578 |- ^- @
8679 ?: =(a +(b)) b
8780 $(b +(b))
88−::
89−Examples
90−--------
81+
82+#### Examples
9183
9284 > (dec 7)
9385 6
@@ -107,29 +99,27 @@ Examples
10799 0xb
108100
109101
102+
110103***
111104### `++div`
112105
113106Divide
114107
115−Computes `a` divided by `b`. Only a whole number, without the remainder, is produced.
108+Computes `a` divided by `b` without remainder.
116109
117−Accepts
118−-------
110+#### Accepts
119111
120112`a` is an atom.
121113
122114`b` is an atom.
123115
124−Produces
125−--------
116+#### Produces
126117
127118An atom.
128119
129−Source
130−------
120+#### Source
131121
132− ++ div
122+ ++ div
133123 ~/ %div
134124 |: [a=`@`1 b=`@`1]
135125 ^- @
@@ -139,9 +129,10 @@ Source
139129 |-
140130 ?: (lth a b) c
141131 $(a (sub a b), c +(c))
142− ::
143−Examples
144−--------
132+
133+
134+#### Examples
135+
145136
146137 > (div 4 2)
147138 2
@@ -161,25 +152,6 @@ Examples
161152
162153 > (div 0x9f 0x29)
163154 6
164− > `@`0x9f ::`0x9f` is an atom represented in the hexadecimal soft atom type (`@ux`).
165− 159
166− > `@`0x29
167− 41
168−
169− > (div 0x29 0x9f)
170− 0
171−
172− > (div ~sibtel-tallyd ~zod)
173− ! exit
174− > `@`~sibtel-tallyd
175− 7.303.014
176− > `@`~zod ::the above operation returned an error because `~zod` is a representation of `0`.
177− 0
178−
179− > `@p`2 ::this casts `2` to `@p` to produce the ship name which represents that atom.
180− ~bud
181− > (div ~sibtel-tallyd ~bud)
182− > 3.651.507
183155
184156
185157***
@@ -187,24 +159,28 @@ Examples
187159
188160Divide with remainder
189161
190−Computes `a` divided by `b` and the remainder of that operation.
162+Computes `a` divided by `b`, producing the quotient and the remainder.
191163
192−Produces
193−-------
164+#### Accepts
165+
166+`a` is an atom.
167+
168+`b` is an atom.
169+
170+#### Produces
194171
195172A cell of atoms.
196173
197−Source
198−------
199−
200− ++ dvr
201− ~/ %dvr
202− |= [a=@ b=@]
203− ^- [p=@ q=@]
204− [(div a b) (mod a b)]
205− ::
206−Examples
207−--------
174+#### Source
175+
176+ ++ dvr
177+ ~/ %dvr
178+ |= [a=@ b=@]
179+ ^- [p=@ q=@]
180+ [(div a b) (mod a b)]
181+
182+#### Examples
183+
208184 > (dvr 17 8)
209185 [p=2 q=1]
210186
@@ -219,45 +195,38 @@ Examples
219195
220196 > (dvr 'ab 'a')
221197 [p=259 q=62]
222− > `@`'a' ::`a` is an atom represented as a different data type.
223− 97 We can cast it to the aura `@` to see what its integer representation is.
198+ > `@`'a'
199+ 97
224200 > `@`'ab'
225201 25.185
226202
227− > (dvr '' 'a')
228− [p=0 q=0]
229−
230−
231203***
232204### `++gte`
233205
234206Greater-than/equal
235207
236−Tests whether a number `a` is greater than or equal a number `b`.
208+Tests whether `a` is greater than or equal to `b`.
237209
238−Accepts
239−-------
210+#### Accepts
240211
241212`a` is an atom.
242213
243214`b` is an atom.
244215
245−Produces
246−--------
216+#### Produces
247217
248−A flag. Our version of a boolean, except that `0` is yes/true and `1` is no/false.
218+A flag.
249219
250−Source
251−------
220+#### Source
252221
253222 ++ gte
254223 ~/ %gte
255224 |= [a=@ b=@]
256225 ^- ?
257226 !(lth a b)
258− ::
259−Examples
260−--------
227+
228+
229+#### Examples
261230
262231 > (gte 100 10)
263232 %.y
@@ -268,18 +237,6 @@ Examples
268237 > (gte 3 4)
269238 %.n
270239
271− > `@`'h' ::`h` is an atom represented as a `cord`, one of many different soft atom types.
272− 104 ::We can cast it to the mold `@` to see what its integer representation is.
273− > `@`'b'
274− 98
275− > (gte 'h' 'b')
276− %.y
277−
278− > (gte '0xc' '0xf')
279− %.n
280−
281− > (gte '0xc' '0xc')
282− %.y
283240
284241
285242***
@@ -289,50 +246,35 @@ Greater-than
289246
290247Tests whether `a` is greater than `b`.
291248
292−Accepts
293−-------
249+#### Accepts
294250
295251`a` is an atom.
296252
297253`b` is an atom.
298254
299−Produces
300−--------
255+#### Produces
301256
302−A flag; our version of a boolean, except that `0` is yes/true and `1` is no/false.
257+A flag.
303258
304−Source
305−------
259+#### Source
306260
307− ++ gth
261+ ++ gth
308262 ~/ %gth
309263 |= [a=@ b=@]
310264 ^- ?
311265 !(lte a b)
312− ::
313−Examples
314−--------
315− > (gth 2 1)
316− %.y
317266
318− > (gth 1 2)
319− %.n
267+
268+
269+#### Examples
320270
321271 > (gth 'd' 'c')
322272 %.y
323− > `@`'d' ::`d` is an atom represented as a `cord`, one of many different soft atom types.
324− 100 ::We can cast it to the mold `@` to see what its integer representation is.
325− > `@`'c'
326− 99
327273
328− > (gth 'doug' 'catherine')
274+ > (gth ~h1 ~m61)
329275 %.n
330− > `@`'doug'
331− 1.735.749.476
332− > `@`'catherine'
333− 1.871.077.167.441.261.125.987
334276
335− > (gth ~h1 ~m61) ::~h1 and ~m61 are both relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
277+ > (gth 'steak' 'brisket')
336278 %.n
337279
338280
@@ -343,28 +285,25 @@ Less-than/equal
343285
344286Tests whether `a` is less than or equal to `b`.
345287
346−Accepts
347−-------
288+#### Accepts
348289
349290`a` is an atom.
350291
351292`b` is an atom.
352293
353−Produces
354−--------
294+#### Produces
355295
356−A flag; our version of a boolean, except that `0` is yes/true and `1` is no/false.
296+A flag.
357297
358−Source
359−------
298+#### Source
360299
361300 ++ lte
362301 ~/ %lte
363302 |= [a=@ b=@]
364303 |(=(a b) (lth a b))
365− ::
366−Examples
367−--------
304+
305+
306+#### Examples
368307
369308 > (lte 4 5)
370309 %.y
@@ -378,6 +317,7 @@ Examples
378317 > (lte 0 0)
379318 %.y
380319
320+
381321 > (lte 'a' 'b')
382322 %.y
383323 > `@`'a'
@@ -388,10 +328,11 @@ Examples
388328 > (lte 'abraham' 'bob')
389329 %.n
390330
391− > (lte ~m61 ~h1) ::~m61 and ~h1 are both relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
331+ > (lte ~m61 ~h1)
392332 %.n
393333
394334
335+
395336***
396337### `++lth`
397338
@@ -399,20 +340,17 @@ Less-than
399340
400341Tests whether `a` is less than `b`.
401342
402−Accepts
403−-------
343+#### Accepts
404344
405345`a` is an atom.
406346
407347`b` is an atom.
408348
409−Produces
410−--------
349+#### Produces
411350
412−A flag; our version of a boolean, except that `0` is yes/true and `1` is no/false.
351+A flag.
413352
414−Source
415−------
353+#### Source
416354
417355 ++ lth
418356 ~/ %lth
@@ -424,9 +362,8 @@ Source
424362 ?& !=(0 b)
425363 $(a (dec a), b (dec b))
426364 == == ==
427− ::
428−Examples
429−--------
365+
366+#### Examples
430367
431368 > (lth 4 5)
432369 %.y
@@ -442,17 +379,13 @@ Examples
442379
443380 > (lth 'a' 'b')
444381 %.y
445− > `@`'a' ::`a` is an atom represented as a different data type.
446− 97 ::We can cast it to the aura `@` to see what its integer representation is.
382+ > `@`'a'
383+ 97
447384 > `@`'b'
448385 98
449386
450387 > (lth 'abraham' 'bob')
451388 %.n
452− > `@`'abraham'
453− > 30.787.873.400.840.801
454− > `@`'bob'
455− > 6.451.042
456389
457390
458391***
@@ -462,30 +395,26 @@ Maximum
462395
463396Computes the greater of `a` and `b`.
464397
465−Accepts
466−-------
398+#### Accepts
467399
468400`a` is an atom.
469401
470402`b` is an atom.
471403
472−Produces
473−--------
404+#### Produces
474405
475406An atom.
476407
477−Source
478−------
408+#### Source
479409
480− ++ max
410+ ++ max
481411 ~/ %max
482412 |= [a=@ b=@]
483413 ^- @
484414 ?: (gth a b) a
485415 b
486− ::
487−Examples
488−--------
416+
417+#### Examples
489418
490419 > (max 10 100)
491420 100
@@ -499,16 +428,16 @@ Examples
499428 > (max 'abraham' 'bob')
500429 30.787.873.400.840.801
501430
502− > `@t`(max 'abraham' 'bob') ::`@t` displays the product as a `cord` (string) instead of a number.
431+ > `@t`(max 'abraham' 'bob')
503432 'abraham'
504433
505434 > `@t`(max 'abraham' 'benjamin')
506435 'benjamin'
507436
508− > `@dr`(max ~m6 ~h1) ::~m61 and ~h1 are relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
437+ > `@dr`(max ~m6 ~h1)
509438 ~h1
510439
511− >`@ux`(max 0xe1 0x1e) ::`0xe1` and `0x1e` are of the hexadecimal soft atom type (`@ux`).
440+ >`@ux`(max 0xe1 0x1e)
512441 0xe1
513442
514443***
@@ -518,30 +447,26 @@ Minimum
518447
519448Computes the lesser of `a` and `b`.
520449
521−Accepts
522−-------
450+#### Accepts
523451
524452`a` is an atom.
525453
526454`b` is an atom.
527455
528−Produces
529−--------
456+#### Produces
530457
531458An atom.
532459
533−Source
534−------
460+#### Source
535461
536− ++ min
462+ ++ min
537463 ~/ %min
538464 |= [a=@ b=@]
539465 ^- @
540466 ?: (lth a b) a
541467 b
542− ::
543−Examples
544−--------
468+
469+#### Examples
545470
546471 > (min 10 100)
547472 10
@@ -555,16 +480,17 @@ Examples
555480 > (min 'abraham' 'bob')
556481 6.451.042
557482
558− > `@t`(min 'abraham' 'bob') ::`@t` causes the product to display as a `cord` instead of a number.
483+ > `@t`(min 'abraham' 'bob')
559484 'bob'
560485
561486 > `@t`(min 'abraham' 'benjamin')
562487 'abraham'
563488
564− > `@dr`(min ~m6 ~h1) ::~m61 and ~h1 are relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
489+ > `@dr`(min ~m6 ~h1)
565490 ~m6
566491
567492
493+
568494***
569495### `++mod`
570496
@@ -572,30 +498,28 @@ Modulus
572498
573499Computes the remainder of dividing `a` by `b`.
574500
575−Accepts
576−-------
501+#### Accepts
577502
578503`a` is an atom.
579504
580505`b` is an atom.
581506
582−Produces
583−--------
507+#### Produces
584508
585509An atom.
586510
587−Source
588−------
511+#### Source
589512
590− ++ mod
513+ ++ mod
591514 ~/ %mod
592515 |: [a=`@`1 b=`@`1]
593516 ^- @
594517 ?< =(0 b)
595518 (sub a (mul b (div a b)))
596− ::
597−Examples
598−--------
519+
520+
521+#### Examples
522+
599523
600524 > (mod 5 2)
601525 1
@@ -609,18 +533,13 @@ Examples
609533 > (mod 40 20)
610534 0
611535
612− > `@`'c' ::`a` is an atom represented as a different data type.
613− 99 ::We can cast it to the aura `@` to see what its integer representation is.
536+ > `@`'c'
537+ 99
614538 >`@`'a'
615539 97
616540 > (mod 'c' 'a')
617541 2
618542
619− > (mod 0xe1 0x1e) ::`0xe1` and `0x1e` are of the hexadecimal soft atom type (`@ux`).
620− 15
621− > `@ux`(mod 0xe1 0x1e)
622− 0xf
623−
624543
625544***
626545### `++mul`
@@ -629,20 +548,17 @@ Multiply
629548
630549Multiplies `a` by `b`.
631550
632−Accepts
633−-------
551+#### Accepts
634552
635553`a` is an atom.
636554
637555`b` is an atom.
638556
639−Produces
640−--------
557+#### Produces
641558
642559An atom.
643560
644−Source
645−------
561+#### Source
646562
647563 ++ mul
648564 ~/ %mul
@@ -652,9 +568,8 @@ Source
652568 |-
653569 ?: =(0 a) c
654570 $(a (dec a), c (add b c))
655− ::
656−Examples
657−--------
571+
572+#### Examples
658573
659574 > (mul 3 4)
660575 12
@@ -662,19 +577,18 @@ Examples
662577 > (mul 0 1)
663578 0
664579
665− > `@`'a' ::`a` is an atom represented as a different data type.
666− 97 ::We can cast it to the aura `@` to see what its integer representation is.
580+ > `@`'a'
581+ 97
667582 > `@`'b'
668583 98
669584 > (mul 'a' 'b')
670585 9.506
671586
672− > (mul 0x1f 0xe) ::`0x1f` and `0xe` are of the hexadecimal soft atom type (`@ux`).
673− 424
674587 >`@ux`(mul 0x1f 0xe)
675588 0x1b2
676589
677590
591+
678592***
679593### `++sub`
680594
@@ -682,31 +596,29 @@ Subtract
682596
683597Subtracts `b` from `a`.
684598
685−Accepts
686−-------
599+#### Accepts
687600
688601`a` is an atom.
689602
690603`b` is an atom.
691604
692−Produces
693−--------
605+#### Produces
694606
695607An atom.
696608
697−Source
698−------
609+#### Source
699610
700− ++ sub
701− ~/ %sub
702− |= [a=@ b=@]
703− ~| %subtract-underflow
704− ^- @
705− ?: =(0 b) a
706− $(a (dec a), b (dec b))
707− ::
708−Examples
709−--------
611+ ++ sub
612+ ~/ %sub
613+ |= [a=@ b=@]
614+ ~_ leaf+"subtract-underflow"
615+ ^- @
616+ ?: =(0 b) a
617+ $(a (dec a), b (dec b))
618+
619+
620+
621+#### Examples
710622
711623 > (sub 10 5)
712624 5
@@ -723,14 +635,14 @@ Examples
723635
724636 > (sub 'c' 'a')
725637 2
726− > `@`'c' ::`a` is an atom represented as a different data type.
727− 99 ::We can cast it to the aura `@` to see what its integer representation is.
638+ > `@`'c'
639+ 99
728640 > `@`'a'
729641 97
730642
731643 > (sub 0x1f 0xe)
732644 17
733− > `@ux`(sub 0x1f 0xe) ::`0xe1` and `0x1e` are of the hexadecimal soft atom type (`@ux`).
645+ > `@ux`(sub 0x1f 0xe)
734646 0x11
735647
736648