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

(documentation: /.let
  "Locally-defined mutually-recursive functions."
  [(let [(even? number)
         (-> Nat Bit)
         (case number
           0 true
           _ (odd? (-- number)))

         (odd? number)
         (-> Nat Bit)
         (case number
           0 false
           _ (even? (-- number)))]
     (and (even? 4)
          (odd? 5)))])

(documentation: /.def:
  "Globally-defined mutually-recursive functions."
  [(def:
     [.public (even? number)
      (-> Nat Bit)
      (case number
        0 true
        _ (odd? (-- number)))]

     [.public (odd? number)
      (-> Nat Bit)
      (case number
        0 false
        _ (even? (-- number)))])])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..let
             ..def:]
            []))
