anchor.diff:  		name (tail (tail list)) checker;
   
     # calls a function (f attr value ) for each record item. returns a list
  -  mapRecordFlatten = f : r : map (attr: f attr (__getAttr attr r) ) (__attrNames r);
  +  mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r);
   
     # to be used with listToAttrs (_a_ttribute _v_alue)
     av = attr : value : { inherit attr value; };
  
positive.code:         # chosen contains flagConfig but only having those attributes elected by flags 
          # (or by implies attributes of elected attributes)
          options = let stateOpts = collectFlags { blockedFlagsBy = {}; result = {}; } 
                                                 (flags ++ ( if (__hasAttr "mandatory" flagConfig) then ["mandatory"] else [] ));
                        # these options have not been chosen (neither by flags nor by implies)
                        unsetOptions = filter ( x : (! __hasAttr x stateOpts.result) && (__hasAttr ("no_"+x) flagConfig)) 
                                              ( __attrNames flagConfig );
                        # no add the corresponding no_ attributes as well ..
                        state = collectFlags stateOpts (map ( x : "no_" + x ) unsetOptions);
                    in # check for blockings:
                       assert ( all id ( map ( b: if (__hasAttr b state.result) 
                                               then throw "flag ${b} is blocked by flag ${__getAttr b state.blockedFlagsBy}"
                                               else true ) 
                                             (__attrNames state.blockedFlagsBy) ) ); 
                      state.result;
          flatOptions = flattenAttrs options;
  
  
negative.code:         # helper function
          collectFlags = # state : flags :
                fold ( flag : s : (
                       if (hasAttr flag s.result) then s # this state has already been visited
                       else if (! hasAttr flag flagConfig) then throw "unkown flag `${flag}' specified"
                             else let fDesc = (builtins.getAttr flag flagConfig);
                                      implied = flatten ( getAttr ["implies"] [] fDesc );
                                      blocked = flatten ( getAttr ["blocks"] [] fDesc ); 
                                      # add this flag
                                      s2 =  s // { result = ( setAttr s.result flag (builtins.getAttr flag flagConfig) );
                                                   blockedFlagsBy = s.blockedFlagsBy 
                                                     // listToAttrs (map (b: av b flag ) blocked); };
                                      # add implied flags
  