From 1c53c2d7499ab01ba45536e63610a7ad094a3708 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Thu, 15 Jan 2026 11:45:03 +1000 Subject: [PATCH] builtins redundant --- nib/std/lists.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nib/std/lists.nix b/nib/std/lists.nix index 8d09937..9e90176 100644 --- a/nib/std/lists.nix +++ b/nib/std/lists.nix @@ -16,11 +16,11 @@ in rec { foldl' = n: if n == -1 then nul - else op (foldl' (n - 1)) (builtins.elemAt list n); + else op (foldl' (n - 1)) (elemAt list n); in - foldl' (builtins.length list - 1); + foldl' (length list - 1); - crossLists = f: foldl (fs: args: builtins.concatMap (f: map f args) fs) [f]; + crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f]; findFirstIndex = pred: default: list: let # A naive recursive implementation would be much simpler, but @@ -36,7 +36,7 @@ in rec { # # We start with index -1 and the 0'th element of the list, which satisfies the invariant resultIndex = - builtins.foldl' ( + foldl' ( index: el: if index < 0 then @@ -63,10 +63,10 @@ in rec { in if index == null then default - else builtins.elemAt list index; + else elemAt list index; zipListsWith = f: fst: snd: - builtins.genList (n: f (builtins.elemAt fst n) (builtins.elemAt snd n)) (min (builtins.length fst) (builtins.length snd)); + genList (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd)); # zipLists = zipListsWith (fst: snd: {inherit fst snd;}); }