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

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

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

            ($.definition /.=
              "Int(eger) equivalence."
              [(= reference sample)])

            ($.definition /.<
              "Int(eger) less-than."
              [(< reference sample)])

            ($.definition /.<=
              "Int(eger) less-than or equal."
              [(<= reference sample)])

            ($.definition /.>
              "Int(eger) greater-than."
              [(> reference sample)])

            ($.definition /.>=
              "Int(eger) greater-than or equal."
              [(>= reference sample)])

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

                  [/.min "Int(eger) minimum."]
                  [/.max "Int(eger) maximum."]
                  ))

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

                  [/.+ "Int(eger) addition."]
                  [/.- "Int(eger) substraction."]
                  [/.* "Int(eger) multiplication."]
                  [/./ "Int(eger) division."]
                  [/.% "Int(eger) remainder."]
                  [/./% "Int(eger) [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
              (format "Integer modulo."
                      \n "Note: The modulo and the remainder are not the same.")
              [(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."
              [(right_shifted parameter subject)])
            )))
