head
builtins.head
Primop
Docs pulled from | This Revision | about 5 hours ago
Takes 1 arguments
list
Return the first element of a list; abort evaluation if the argument
isn’t a list or is an empty list. You can test whether a list is
empty by comparing it with []
.
This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.
Noogle detected
Detected Type
head :: [a] -> a
Implementation
This function is implemented in c++ and is part of the native nix runtime.