2title = "1a: Basic Arithmetic"
11Produces the sum of `a` and `b`.
15`a` is an [`atom`](/docs/glossary/atom).
17`b` is an [`atom`](/docs/glossary/atom).
21An [`atom`](/docs/glossary/atom).
47> (add 1.333 (mul 2 2))
81`a` is an [`atom`](/docs/glossary/atom).
85An [`atom`](/docs/glossary/atom).
93 ~_ leaf+"decrement-underflow"
134Computes `a` divided by `b` without remainder.
138`a` is an [`atom`](/docs/glossary/atom).
140`b` is an [`atom`](/docs/glossary/atom).
144An [`atom`](/docs/glossary/atom).
153 ~_ leaf+"divide-by-zero"
158 $(a (sub a b), c +(c))
198Computes `a` divided by `b`, producing the quotient and the remainder.
202`a` is an [`atom`](/docs/glossary/atom).
204`b` is an [`atom`](/docs/glossary/atom).
208A cell of [`atoms`](/docs/glossary/atom).
217 [(div a b) (mod a b)]
257Tests whether `a` is greater than or equal to `b`.
261`a` is an [`atom`](/docs/glossary/atom).
263`b` is an [`atom`](/docs/glossary/atom).
302Tests whether `a` is greater than `b`.
306`a` is an [`atom`](/docs/glossary/atom).
308`b` is an [`atom`](/docs/glossary/atom).
337> (gth 'steak' 'brisket')
347Tests whether `a` is less than or equal to `b`.
351`a` is an [`atom`](/docs/glossary/atom).
353`b` is an [`atom`](/docs/glossary/atom).
400> (lte 'abraham' 'bob')
415Tests whether `a` is less than `b`.
419`a` is an [`atom`](/docs/glossary/atom).
421`b` is an [`atom`](/docs/glossary/atom).
438 $(a (dec a), b (dec b))
474> (lth 'abraham' 'bob')
484Computes the greater of `a` and `b`.
488`a` is an [`atom`](/docs/glossary/atom).
490`b` is an [`atom`](/docs/glossary/atom).
494An [`atom`](/docs/glossary/atom).
525> (max 'abraham' 'bob')
52630.787.873.400.840.801
530> `@t`(max 'abraham' 'bob')
535> `@t`(max 'abraham' 'benjamin')
555Computes the lesser of `a` and `b`.
559`a` is an [`atom`](/docs/glossary/atom).
561`b` is an [`atom`](/docs/glossary/atom).
565An [`atom`](/docs/glossary/atom).
596> (min 'abraham' 'bob')
601> `@t`(min 'abraham' 'bob')
606> `@t`(min 'abraham' 'benjamin')
621Computes the remainder of dividing `a` by `b`.
625`a` is an [`atom`](/docs/glossary/atom).
627`b` is an [`atom`](/docs/glossary/atom).
631An [`atom`](/docs/glossary/atom).
641 (sub a (mul b (div a b)))
681Multiplies `a` by `b`.
685`a` is an [`atom`](/docs/glossary/atom).
687`b` is an [`atom`](/docs/glossary/atom).
691An [`atom`](/docs/glossary/atom).
703 $(a (dec a), c (add b c))
738Subtracts `b` from `a`.
742`a` is an [`atom`](/docs/glossary/atom).
744`b` is an [`atom`](/docs/glossary/atom).
748An [`atom`](/docs/glossary/atom).
756 ~_ leaf+"subtract-underflow"
759 $(a (dec a), b (dec b))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list