anchor.diff:      [<CompiledName("CreateAnd")>]
       let andr (regex1 : Regex) (regex2 : Regex) : Regex =
           // Create the Concat pattern, then simplify it before returning.
  -        simplify (And (regex1, regex2)) id
  +        simplifyRec (And (regex1, regex2)) id
   
       /// Disjunction of two regular expressions.
       /// This returns a new regular expression which matches an input string
  
positive.code: 
  open System.Diagnostics
  open ExtCore.Control.Cps
  open ExtCore.Control.Collections
  open FSharpLex.SpecializedCollections
  
  (*  Turn off warning about uppercase variable identifiers; some variables
  
negative.code:             // Use DeMorgan's rules to simplify negation of Or and And patterns when possible.
              // This isn't specified in the original paper, but it helps to compact the regex.
              | Or (regex1, regex2) ->
                  return! simplifyRec <| And (regex1, regex2)
              | And (regex1, regex2) ->
                  return! simplifyRec <| Or (regex1, regex2)
  
              // Double-negation cancels out.
              | Negate regex ->
  