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

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

        ($.definition /.pre_condition_failed)
        ($.definition /.post_condition_failed)

        ($.definition /.pre
          (format "Pre-conditions."
                  \n "Given a test and an expression to run, only runs the expression if the test passes."
                  \n "Otherwise, an error is raised.")
          [(pre (i.= +4 (i.+ +2 +2))
                (foo +123 +456 +789))])

        ($.definition /.post
          (format "Post-conditions."
                  \n "Given a predicate and an expression to run, evaluates the expression and then tests the output with the predicate."
                  \n "If the predicate returns #1, returns the value of the expression."
                  \n "Otherwise, an error is raised.")
          [(post i.even?
                 (i.+ +2 +2))])
        ))
