... 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]
   [data
    [text (.only \n)
     ["%" \\injection]]]]]
 [\\library
  ["[0]" /]])

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

        ($.definition /.memoization)
        ($.definition (/.Memo input output))

        ($.definition /.open
          "Memoization where the memoized results can be re-used accross invocations."
          ($.example (' (open memo))))

        ($.definition /.closed
          (%.message "Memoization confined to a single invocation to the function (not counting any subsequent recursive invocations)."
                     \n "Memoized results will be re-used during recursive invocations, but cannot be accessed after the main invocation has ended.")
          ($.example (' (closed hash memo))))

        ($.definition /.none
          (%.message "No memoization at all."
                     \n "This is useful as a test control when measuring the effect of using memoization.")
          ($.example (' (none hash memo))))
        ))
