anchor.diff:  
   let (|->),combine =
     let newbranch p1 t1 p2 t2 =
  -    let zp = p1 lxor p2 in
  -    let b = zp land (-zp) in
  -    let p = p1 land (b - 1) in
  +    let zp = p1 lxor p2
  +    let b = zp land (-zp)
  +    let p = p1 land (b - 1)
       if p1 land b = 0 then Branch(p,b,t1,t2)
  -    else Branch(p,b,t2,t1) in
  +    else Branch(p,b,t2,t1)
     let rec define_list (x,y as xy) l =
       match l with
         (a,b as ab)::t ->
  -          let c = Pervasives.compare x a in
  +          let c = Pervasives.compare x a
             if c = 0 then xy::t
             else if c < 0 then xy::l
             else ab::(define_list xy t)
  
positive.code:            (match (combine op z l1 l2,combine op z r1 r2) with
                (Empty,r) -> r | (l,Empty) -> l | (l,r) -> Branch(p1,b1,l,r))
            else
              newbranch p1 t1 p2 t2 in
    (|->),combine;;
  
  (* ------------------------------------------------------------------------- *)
  (* Special case of point function.                                           *)
  (* ------------------------------------------------------------------------- *)
  
  let (|=>) = fun x y -> (x |-> y) undefined;;
  
  (* ------------------------------------------------------------------------- *)
  (* Grab an arbitrary element.                                                *)
  (* ------------------------------------------------------------------------- *)
  
  let rec choose t =
    match t with
      Empty -> failwith "choose: completely undefined function"
    | Leaf(h,l) -> hd l
    | Branch(b,p,t1,t2) -> choose t1;;
  
  (* ------------------------------------------------------------------------- *)
  (* Install a trivial printer for the general polymorphic case.               *)
  (* ------------------------------------------------------------------------- *)
  
  let print_fpf (f:('a,'b)func) = Format.print_string "<func>";;
  
  #install_printer print_fpf;;
  
  (* ------------------------------------------------------------------------- *)
  (* Set operations parametrized by equality (from Steven Obua).               *)
  (* ------------------------------------------------------------------------- *)
  
  let rec mem' eq =
    let rec mem x lis =
      match lis with
        [] -> false
      | (h::t) -> eq x h or mem x t
    in mem;;
  
  let insert' eq x l =
    if mem' eq x l then l else x::l;;
  
  let union' eq l1 l2 = itlist (insert' eq) l1 l2;;
  
  let unions' eq l = itlist (union' eq) l [];;
  
  let subtract' eq l1 l2 = filter (fun x -> not (mem' eq x l2)) l1;;
  
  (* ------------------------------------------------------------------------- *)
  (* Accepts decimal, hex or binary numeral, using C notation 0x... for hex    *)
  (* and analogous 0b... for binary.                                           *)
  (* ------------------------------------------------------------------------- *)
  
  let num_of_string =
    let values =
     ["0",0; "1",1; "2",2; "3",3; "4",4;
      "5",5; "6",6; "7",7; "8",8; "9",9;
      "a",10; "A",10; "b",11; "B",11;
      "c",12; "C",12; "d",13; "D",13;
      "e",14; "E",14; "f",15; "F",15] in
    let valof b s =
      let v = Int(assoc s values) in
      if v </ b then v else failwith "num_of_string: invalid digit for base"
    and two = num_2 and ten = num_10 and sixteen = Int 16 in
    let rec num_of_stringlist b l =
      match l with
        [] -> failwith "num_of_string: no digits after base indicator"
      | [h] -> valof b h
      | h::t -> valof b h +/ b */ num_of_stringlist b t in
    fun s ->
      match explode(s) with
          [] -> failwith "num_of_string: no digits"
        | "0"::"x"::hexdigits -> num_of_stringlist sixteen (rev hexdigits)
        | "0"::"b"::bindigits -> num_of_stringlist two (rev bindigits)
        | decdigits -> num_of_stringlist ten (rev decdigits);;
  
  (* ------------------------------------------------------------------------- *)
  (* Convenient conversion between files and (lists of) strings.               *)
  (* ------------------------------------------------------------------------- *)
  
  let strings_of_file filename =
    let fd = try Pervasives.open_in filename
             with Sys_error _ ->
               failwith("strings_of_file: can't open "^filename) in
    let rec suck_lines acc =
      try let l = Pervasives.input_line fd in
          suck_lines (l::acc)
      with End_of_file -> rev acc in
    let data = suck_lines [] in
    (Pervasives.close_in fd; data);;
  
  let string_of_file filename =
    end_itlist (fun s t -> s^"\n"^t) (strings_of_file filename);;
  
  let file_of_string filename s =
    let fd = Pervasives.open_out filename in
    output_string fd s; close_out fd;;
  
negative.code:       | Branch(p,b,l,r) ->
            if k land (b - 1) <> p then newbranch p t k (Leaf(k,[x,y]))
            else if k land b = 0 then Branch(p,b,upd l,r)
            else Branch(p,b,l,upd r)
      upd
    let rec combine op z t1 t2 =
      match (t1,t2) with
        Empty,_ -> t2
      | _,Empty -> t1
      | Leaf(h1,l1),Leaf(h2,l2) ->
            if h1 = h2 then
              let l = combine_list op z l1 l2
              if l = [] then Empty else Leaf(h1,l)
            else newbranch h1 t1 h2 t2
      | (Leaf(k,lis) as lf),(Branch(p,b,l,r) as br) ->
  