anchor.diff:      let
         len = length list;
         first = head list;
  -      pivot' = n: acc@{ left, right }: let el = elemAt list n; next = pivot' (n + 1); in
  -        if n == len
  -          then acc
  -        else if strictLess first el
  -          then next { inherit left; right = [ el ] ++ right; }
  -        else
  -          next { left = [ el ] ++ left; inherit right; };
  +      pivot' = n: acc@{ left, right }:
  +        let
  +          el = elemAt list n;
  +          next = pivot' (n + 1);
  +        in
  +        if n == len then
  +          acc
  +        else if strictLess first el then
  +          next {
  +            inherit left;
  +            right = [ el ] ++ right;
  +          }
  +        else
  +          next {
  +            left = [ el ] ++ left;
  +            inherit right;
  +          };
         pivot = pivot' 1 { left = []; right = []; };
       in
  -      if len < 2 then list
  -      else (sort strictLess pivot.left) ++  [ first ] ++  (sort strictLess pivot.right));
  +    if len < 2 then
  +      list
  +    else
  +      (sort strictLess pivot.left)
  +      ++ [ first ]
  +      ++  (sort strictLess pivot.right));
   
   
     # Return the first (at most) N elements of a list.
  
positive.code:   # predicate, returns `default' if no such element exists, or
    # `multiple' if there are multiple matching elements.
    findSingle = pred: default: multiple: list:
      let found = filter pred list; len = length found;
      in if len == 0 then default
        else if len != 1 then multiple
        else head found;
  
  
    # Find the first element in the list matching the specified
    # predicate or returns `default' if no such element exists.
    findFirst = pred: default: list:
      let found = filter pred list;
      in if found == [] then default else head found;
  
  
    # Return true iff function `pred' returns true for at least element
  
negative.code:       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.
  