anchor.diff:    let inline outputWithFun write maxCols doc =
       outputWithActions
         {new Actions () with
  -        member this.Write s = write s}
  +        member t.Write s = write s}
         maxCols
         doc
   
  
positive.code: 
    let rec output (actions: Actions) doc =
      match force doc with
       | NIL -> ()
       | PRINT (str, doc) ->
         actions.Write str
         output actions doc
       | OBJ (obj, doc) ->
         actions.User obj
         output actions doc
       | LINEFEED (prefix, doc) ->
         actions.Line ()
         actions.Write prefix
         output actions doc
  
    let rec fits maxColsOr0 usedCols doc =
      maxColsOr0 = 0 ||
      usedCols <= maxColsOr0 &&
      match force doc with
       | NIL | LINEFEED _ -> true
       | OBJ (_, doc) ->
         fits maxColsOr0 usedCols doc
       | PRINT (str, doc) ->
         fits maxColsOr0 (usedCols + str.Length) doc
  
    type Docs =
      | Done
      | Docs of string * Doc * Docs
  
    let rec layout maxColsOr0 usedCols = function
      | Done -> NIL
      | Docs (prefix, doc, rest) ->
        match doc with
         | LAZY doc ->
           layout maxColsOr0 usedCols ^ Docs (prefix, force doc, rest)
         | EMPTY ->
           layout maxColsOr0 usedCols rest
         | JOIN (lhs, rhs) ->
           layout maxColsOr0 usedCols ^
           Docs (prefix, lhs, Docs (prefix, rhs, rest))
         | NEST (txt, doc) ->
           layout maxColsOr0 usedCols ^ Docs (prefix + txt, doc, rest)
         | TEXT str ->
           PRINT (str, lazy layout maxColsOr0 (usedCols + str.Length) rest)
         | USER obj ->
           OBJ (obj, lazy layout maxColsOr0 usedCols rest)
         | LINE _ ->
           LINEFEED (prefix, lazy layout maxColsOr0 prefix.Length rest)
         | CHOICE (wide, narrow) ->
           let wide = layout maxColsOr0 usedCols ^ Docs (prefix, wide, rest)
           if fits maxColsOr0 usedCols ^ lazy wide
           then wide
           else layout maxColsOr0 usedCols ^ Docs (prefix, narrow, rest)
         | COLUMN f ->
           layout maxColsOr0 usedCols ^ Docs (prefix, f usedCols, rest)
         | NESTING f ->
           layout maxColsOr0 usedCols ^ Docs (prefix, f prefix.Length, rest)
  
    let outputWithActions actions maxCols doc =
      let maxColsOr0 =
  
negative.code:      | [] -> empty
       | x::xs -> List.fold (flip bop) x xs
    let joinWith bop xs = joinWith' bop xs
  
    let joinSep sep xs = xs |> joinWith' ^ fun l r -> join3 l sep r
  
    let hsep    xs = joinWith' (<+>)  xs
    let hcat    xs = joinWith' (<^>)  xs
    let vsep    xs = joinWith' (<.>)  xs
    let vcat    xs = joinWith' (<..>) xs
    let fillSep xs = joinWith' (</>)  xs
    let fillCat xs = joinWith' (<//>) xs
  
    let sep xs = group ^ vsep xs
    let cat xs = group ^ vcat xs
  
    let inline enclose' (l, r) d = join3 l d r
    let enclose (l, r) d = enclose' (l, r) d
  
    let squotes  d = enclose' lrsquote  d
    let dquotes  d = enclose' lrdquote  d
    let parens   d = enclose' lrparen   d
    let angles   d = enclose' lrangle   d
    let braces   d = enclose' lrbrace   d
    let brackets d = enclose' lrbracket d
  
    type t =
     | Nil
     | Print of text: string * Lazy<t>
     | Linefeed of prefix: string * Lazy<t>
     | Obj of obj: obj * Lazy<t>
  
    type [<AbstractClass>] Actions () =
      abstract Line: unit -> unit
  