(.using
  [library
   [lux {"-" list}
    ["$" documentation {"+" documentation:}]
    [control
     ["<>" parser
      ["<[0]>" code]]]
    [data
     ["[0]" text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: (/.Tree @ tag value)
  "A finger tree.")

(documentation: (/.Builder @ tag)
  "A builder for finter tree structures.")

(documentation: /.builder
  "A new builder using the given monoid."
  [(builder monoid)])

(documentation: /.value
  ""
  [(value tree)])

(documentation: /.tags
  ""
  [(tags tree)])

(documentation: /.values
  ""
  [(values tree)])

(documentation: /.one
  "Finds one value that meets the predicate."
  [(one predicate tree)])

(documentation: /.exists?
  "Verifies that a value exists which meets the predicate."
  [(exists? predicate tree)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Tree
             ..Builder
             ..builder
             ..value
             ..tags
             ..values
             ..one
             ..exists?
             ($.default /.tag)
             ($.default /.root)]
            []))
