(.using
  [library
   [lux {"-" private}
    ["$" documentation {"+" documentation:}]
    [data
     ["[0]" text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: (/.Modulus %)
  (format "A number used as a modulus in modular arithmetic."
          \n "It cannot be 0."))

(documentation: /.congruent?
  ""
  [(congruent? modulus reference subject)])

(documentation: /.literal
  ""
  ["Success!"
   (literal 123)]
  ["Failure!"
   (literal 0)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Modulus
             ..congruent?
             ..literal
             ($.default /.zero_cannot_be_a_modulus)
             ($.default /.modulus)
             ($.default /.divisor)
             ($.default /.=)]
            []))
