Nix list builtins

  • concatLists lists - flattens a list of lists
  • elem x xs - true if x is in list xs, otherwise false
  • elemAt xs n - return element at (0-indexed) position n in list xs
  • filter f xs - return the elements of xs for which f returns true
  • foldl' op nul list - strict left fold
  • genList generator length - Generate a list of length length with each element i equal to generator i
  • head list - first element of a list
  • isList e - returns true if e is a list, otherwise false
  • length e - length of the list e
  • sort comparator list - return list in sorted order according to comparator; stable sort
  • tail list - return all but the first element of list