anchor.diff:  
   type Subst<'p, 'w> = array<'p> -> 'w -> 'w
   
  -type [<AbstractClass;AllowNullLiteral>] ProductS<'e, 'r, 'p, 'w> () =
  +type [<AbstractClass;AllowNullLiteral>] ProductS<'e, 'r, 'cs, 'p, 'w> () =
     abstract Subst: array<'p> * int * byref<'r> -> int
   
   type SumS<'c, 's, 'p, 'w> = SS of list<Subst<'p, 'w>>
  
positive.code:     failwithf "Expected %d elems, but was given %d elems" n ps.Length
  
  let missS ps w = check ps 0; w
  let makeS (m: AsProduct<'r, 'w>) (rs: ProductS<'r, 'r, 'p, 'w>) =
    match rs with
     | null -> missS
     | rs -> fun ps w ->
  
negative.code: 
  type Elems<'p, 'w> = 'w -> array<'p>
  
  type ProductE<'e, 'r, 'cs, 'p, 'w> =
    | Miss
    | Hit of num: int * ext: ('w -> int -> array<'p> -> unit)
  type SumE<'c, 's, 'p, 'w> = SE of list<Elems<'p, 'w>>
  
  let missE _ = [||]
  let makeE (re: ProductE<'r, 'r, 'cs, 'p, 'w>) =
    match re with
     | Miss -> missE
     | Hit (num, ext) -> fun w ->
       let ps = Array.zeroCreate num
       ext w 0 ps
       ps
  
  type [<InferenceRules>] Elems () =
    inherit Rep ()
    member g.ElemMiss (_: Elem<'e, 'er, 'cs, 'w>) : ProductE<'e, 'er, 'cs, 'p, 'w> =
      Miss
    member g.ElemHit (e: Elem<'p, 'er, 'cs, 'w>) : ProductE<'p, 'er, 'cs, 'p, 'w> =
      Hit (1, fun w i ps -> ps.[i] <- e.Get w)
    member g.Times (ee: ProductE<    'e     , And<'e, 'r>, 'cs, 'p, 'w>,
                    re: ProductE<        'r ,         'r , 'cs, 'p, 'w>)
                      : ProductE<And<'e, 'r>, And<'e, 'r>, 'cs, 'p, 'w> =
      match (ee, re) with
       | (Miss, Miss) -> Miss
       | (Hit (n, e), Miss)
  