anchor.diff:  
     (** Apply the given operator between each element of the given list. Requires at least two signals. *)
     let reduce op s = 
  -    match length s with
  +    match List.length s with
       | 0 | 1 -> failwith ("Cant reduce 0 or 1 bits")
  -    | _ -> fold_left (fun acc x -> op acc x) (hd s) (tl s)
  +    | _ -> List.fold (fun acc x -> op acc x) (List.head s) (List.tail s)
   
     (** Lets the single reduce case pass by just returning the data. *)
     let reduce_1 op s = 
  -    match length s with
  -    | 1 -> hd s 
  +    match List.length s with
  +    | 1 -> List.head s 
       | _ -> reduce op s
   
     (* ------------------------------------------------------------------------ *)
  
positive.code: 
    (** Create a tristate *)
    let tristate d = 
      let len = length d in
      if len <= 0 then failwith "Tristate must have at least one driver";
      iter (fun ((oe : Signal),_) -> if (oe.width) <> 1 then failwith "Tristate enable must be one bit") d;
      check_same (map snd d);
      { su = Signal_tri(signal_incr_uid(), (snd (hd d)).width, d) }
        
    (* ------------------------------------------------------------------------ *)
    (* ------------------------------------------------------------------------ *)
  
negative.code: 
    (** Constant from a string using verilog style constant formatting ie 32'd12 *)
    let constv (s:string) : Signal = 
      let slen, sval = match s.Split('\'') with [|s0;s1|] -> s0,s1 | _ -> failwith ("Invalid verilog style constant: " ^ s) in
      let len = int slen in
      let ctrl = sval.[0] in
      let sval = sval.Substring(1, (String.length sval - 1)) in
      match ctrl with
      | 'd' -> constd len sval
      | 'x' | 'h' -> consthu len sval
  