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

(documentation: (/.Cont input output)
  "Continuations.")

(documentation: /.continued
  "Continues a continuation thunk."
  [(continued next cont)])

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

(documentation: /.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)))))])

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

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Cont
             ..continued
             ..result
             ..with_current
             ..pending
             ($.default /.reset)
             ($.default /.shift)
             ($.default /.functor)
             ($.default /.apply)
             ($.default /.monad)
             ($.default /.portal)]
            []))
