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

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

        ($.definition /.reset)
        ($.definition /.shift)
        ($.definition /.functor)
        ($.definition /.apply)
        ($.definition /.monad)
        ($.definition /.portal)

        ($.definition (/.Cont input output)
          "Continuations.")

        ($.definition /.continued
          "Continues a continuation thunk."
          [(continued next cont)])

        ($.definition /.result
          "Forces a continuation thunk to be evaluated."
          [(result cont)])

        ($.definition /.with_current
          "Call with current continuation."
          [(with_current
             (function (_ go)
               (do /.monad
                 [.let [nexus (function (nexus val)
                                (go [nexus val]))]
                  _ (go [nexus init])]
                 (in (undefined)))))])

        ($.definition /.pending
          "Turns any expression into a function that is pending a continuation."
          [(pending (some_function some_input))])
        ))
