concatLists
builtins.concatLists
Primop
Docs pulled from | This Revision | about 4 hours ago
Nix manual
Takes 1 arguments
lists
Concatenate a list of lists into a single list.
Time Complexity
O(N) where:
N = total number of elements across all lists
Noogle detected
Detected Type
concatLists :: [[a]] -> [a]
Implementation
This function is implemented in c++ and is part of the native nix runtime.
static void prim_concatLists(EvalState & state, const PosIdx pos, Value ** args, Value & v)
{
state.forceList(*args[0], pos, "while evaluating the first argument passed to builtins.concatLists");
auto listView = args[0]->listView();
state.concatLists(v, listView.span(), pos, "while evaluating a value of the list passed to builtins.concatLists");
}