... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

(.require
 [library
  [lux (.except)
   ["$" documentation]]]
 [\\library
  ["[0]" /]])

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

        ($.definition /.functor)
        ($.definition /.apply)
        ($.definition /.monad)

        ($.definition (/.Thread ! it)
          "An imperative process with access to mutable values.")

        ($.definition (/.Box ! it)
          "A mutable box holding a value.")

        ($.definition /.box
          "A brand-new box initialized to the given value."
          ($.example (' (box init))))

        ($.definition /.read!
          "Reads the current value in the box."
          ($.example (' (read! box))))

        ($.definition /.write!
          "Mutates the value in the box."
          ($.example (' (write! value box))))

        ($.definition /.value
          "Executes the imperative thread in a self-contained way."
          ($.example (' (value thread))))

        ($.definition /.io
          "Transforms the imperative thread into an I/O computation.")

        ($.definition /.update!
          "Update a box's value by applying a function to it."
          ($.example (' (update! f box))))
        ))
