query
On this page

tail

builtins.tail

Primop
Docs pulled from | This Revision | about 4 hours ago

Takes 1 arguments

list


Return the list without its first item; abort evaluation if the argument isn’t a list or is an empty list.

Warning

This function should generally be avoided since it's inefficient: unlike Haskell's tail, it takes O(n) time, so recursing over a list by repeatedly calling tail takes O(n^2) time.

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

Aliases

Detected Type
tail :: [a] -> [a]

Implementation

This function is implemented in c++ and is part of the native nix runtime.