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

(documentation: (/.Mixin input output)
  "A partially-defined function which can be mixed with others to inherit their behavior.")

(documentation: /.fixed
  "Given a mixin, produces a normal function."
  [(fixed f)])

(documentation: /.nothing
  "A mixin that does nothing and just delegates work to the next mixin.")

(documentation: /.mixed
  "Produces a new mixin, where the behavior of the child can make use of the behavior of the parent."
  [(mixed parent child)])

(documentation: /.advice
  "Only apply then mixin when the input meets some criterion."
  [(advice when then)])

(documentation: /.before
  "Executes an action before doing the main work."
  [(before monad action)])

(documentation: /.after
  "Executes an action after doing the main work."
  [(after monad action)])

(documentation: (/.Recursive input output)
  "An indirectly recursive function.")

(documentation: /.of_recursive
  "Transform an indirectly recursive function into a mixin."
  [(of_recursive recursive)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Mixin
             ..fixed
             ..nothing
             ..mixed
             ..advice
             ..before
             ..after
             ..Recursive
             ..of_recursive
             ($.default /.monoid)]
            []))
