... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\injection]]]
   [meta
    [macro
     ["[0]" template]]]]]
 [\\library
  ["[0]" /]])

(`` (the .public documentation
      (List $.Documentation)
      (list ($.module /._
                      "")

            ($.definition /.positive?)
            ($.definition /.negative?)
            ($.definition /.zero?)
            ($.definition /.even?)
            ($.definition /.odd?)
            ($.definition /.co_prime?)
            ($.definition /.decimal)
            ($.definition /.equivalence)
            ($.definition /.order)
            ($.definition /.enum)
            ($.definition /.interval)
            ($.definition /.addition)
            ($.definition /.multiplication)
            ($.definition /.maximum)
            ($.definition /.minimum)
            ($.definition /.binary)
            ($.definition /.octal)
            ($.definition /.base_10)
            ($.definition /.hex)
            ($.definition /.hash)

            ($.definition /.=
              "Integer equivalence."
              ($.example (' (= expected actual))))

            ($.definition /.<
              "Integer less-than."
              ($.example (' (< reference it))))

            ($.definition /.<=
              "Integer less-than or equal."
              ($.example (' (<= reference it))))

            ($.definition /.>
              "Integer greater-than."
              ($.example (' (> reference it))))

            ($.definition /.>=
              "Integer greater-than or equal."
              ($.example (' (>= reference it))))

            (,, (template.with [<name> <doc>]
                  [($.definition <name>
                     <doc>)]

                  [/.min "Integer minimum."]
                  [/.max "Integer maximum."]
                  ))

            (,, (template.with [<name> <doc>]
                  [($.definition <name>
                     <doc>)]

                  [/.+ "Integer addition."]
                  [/.- "Integer substraction."]
                  [/.* "Integer multiplication."]
                  [/./ "Integer division."]
                  [/.% "Integer remainder."]
                  [/./% "Integer [division remainder]."]
                  ))

            ($.definition /.opposite
              "A value of equal magnitude and opposite sign.")

            ($.definition /.abs
              "A value of equal magnitude and positive sign.")

            ($.definition /.signum
              "A value (either -1, 0 or +0) which represents the sign.")

            ($.definition /.mod
              (%.message "Integer modulo."
                         \n "Note: The modulo and the remainder are not the same.")
              ($.example (' (mod divisor dividend))))

            ($.definition /.gcd
              "Greatest Common Divisor.")

            ($.definition /.extended_gcd
              "Extended euclidean algorithm.")

            ($.definition /.lcm
              "Least Common Multiple.")

            ($.definition /.right_shifted
              "Signed/arithmetic bitwise right-shift."
              ($.example (' (right_shifted parameter subject))))
            )))
