From 986cf9adb8cb5a1076b4aee7844fe619eabfda71 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Thu, 21 May 2026 17:00:46 -0400 Subject: [PATCH] lib.lists.init: rewrite to not call `take` --- lib/lists.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lists.nix b/lib/lists.nix index 68f3ccb74613..860bf5560797 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -1875,7 +1875,7 @@ rec { init = list: assert lib.assertMsg (list != [ ]) "lists.init: list must not be empty!"; - take (length list - 1) list; + genList (elemAt list) (length list - 1); /** Returns the image of the cross product of some lists by a function.