anchor.diff:        else if builtins ? hasAttr && builtins.hasAttr attr e
         then getAttr (tail attrPath) default (builtins.getAttr attr e)
         else default;
  +
  +  # shortcut for getAttr ["name"] default attrs
  +  maybeAttr = name: default: attrs:
  +    if (__hasAttr name attrs) then (__getAttr name attrs) else default;
   
   
     # Filter a list using a predicate; that is, return a list containing
  
positive.code:   # returns atribute values as a list 
    flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set);
    mapIf = cond : f :  fold ( x : l : if (cond x) then [(f x)] ++ l else l) [];
  
  # Marc 2nd proposal: (not everything has been tested in detail yet..)
  
  
negative.code: 
    closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});
  
    stringToCharacters = s : let l = __stringLength s; in
      if (__lessThan l 1) then [""] else  [(__substring 0 1 s)] ++ stringToCharacters (__substring 1 (__sub l 1) s);
  
    # should this be implemented as primop ? Yes it should..
    escapeShellArg = s :
      let escapeChar = x : if ( x == "'" ) then "'\"'\"'" else x;
      in "'" + concatStrings (map escapeChar (stringToCharacters s) ) +"'";
  
    defineShList = name : list : "\n${name}=(${concatStringsSep " " (map escapeShellArg list)})\n";
  
    # calls a function (f attr value ) for each record item. returns a list
    mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r);
  
    # to be used with listToAttrs (_a_ttribute _v_alue)
    nv = name : value : { inherit name value; };
    # attribute set containing one attribute
    nvs = name : value : listToAttrs [ (nv name value) ];
  