anchor.diff:  
   rec {
   
  -  inherit (builtins) head tail length isList elemAt concatLists filter elem;
  +  inherit (builtins) head tail length isList elemAt concatLists filter elem genList;
   
   
     # Create a list consisting of a single element.  `singleton x' is
  
positive.code:   foldl' = builtins.foldl' or foldl;
  
  
    # map with index: `imap (i: v: "${v}-${toString i}") ["a" "b"] ==
    # ["a-1" "b-2"]'
    imap = f: list:
      let
        len = length list;
        imap' = n:
          if n == len
            then []
            else [ (f (n + 1) (elemAt list n)) ] ++ imap' (n + 1);
      in imap' 0;
  
  
    # Map and concatenate the result.
  
negative.code: 
  
    # Return the first (at most) N elements of a list.
    take =
      if builtins ? genList then
        count: sublist 0 count
      else
        count: list:
          let
            len = length list;
            take' = n:
              if n == len || n == count
                then []
              else
                [ (elemAt list n) ] ++ take' (n + 1);
          in take' 0;
  
  
    # Remove the first (at most) N elements of a list.
    drop =
      if builtins ? genList then
        count: list: sublist count (length list) list
      else
        count: list:
          let
            len = length list;
            drop' = n:
              if n == -1 || n < count
                then []
              else
                drop' (n - 1) ++ [ (elemAt list n) ];
          in drop' (len - 1);
  
  
    # Return a list consisting of at most ‘count’ elements of ‘list’,
    # starting at index ‘start’.
    sublist = start: count: list:
      let len = length list; in
      genList
        (n: elemAt list (n + start))
        (if start >= len then 0
         else if start + count > len then len - start
         else count);
  
  
    # Return the last element of a list.
  