anchor.diff:      listToAttrs (map (n: nameValuePair n (f n)) names);
   
   
  -  /* Check whether the argument is a derivation. */
  +  /* Check whether the argument is a derivation. Any set with
  +     { type = "derivation"; } counts as a derivation.
  +
  +     Example:
  +       nixpkgs = import <nixpkgs> {}
  +       isDerivation nixpkgs.ruby
  +       => true
  +       isDerivation "foobar"
  +       => false
  +  */
     isDerivation = x: isAttrs x && x ? type && x.type == "derivation";
   
  -
  -  /* Convert a store path to a fake derivation. */
  +  /* Converts a store path to a fake derivation. */
     toDerivation = path:
       let path' = builtins.storePath path; in
       { type = "derivation";
  
positive.code:       !(isAttrs lhs && isAttrs rhs)
      ) lhs rhs;
  
    matchAttrs = pattern: attrs:
      fold or false (attrValues (zipAttrsWithNames (attrNames pattern) (n: values:
        let pat = head values; val = head (tail values); in
  
negative.code:       else pat == val
      ) [pattern attrs]));
  
    /* Override only the attributes that are already present in the old set
      useful for deep-overriding.
  
      Example:
        x = { a = { b = 4; c = 3; }; }
        overrideExisting x { a = { b = 6; d = 2; }; }
        => { a = { b = 6; d = 2; }; }
    */
    overrideExisting = old: new:
      old // listToAttrs (map (attr: nameValuePair attr (attrByPath [attr] old.${attr} new)) (attrNames old));
  
  
    /*** deprecated stuff ***/
  
    deepSeqAttrs = throw "removed 2016-02-29 because unused and broken";
    zipWithNames = zipAttrsWithNames;
    zip = builtins.trace
      "lib.zip is deprecated, use lib.zipAttrsWith instead" zipAttrsWith;
  
  }
  