From 4678184b4e1337bc5bbbb4041fcd8556d5c2a542 Mon Sep 17 00:00:00 2001 From: azahi Date: Mon, 17 Feb 2025 02:30:01 +0300 Subject: 2025-02-17 --- lib/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index fbb6086..c498c38 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -15,16 +15,16 @@ isEven = number: - assert (builtins.isInt number) || (builtins.isFloat number); + assert builtins.isInt number || builtins.isFloat number; builtins.div number 2 == 0; isOdd = number: !lib.isEven number; pow = base: exponent: - assert (builtins.isInt base) && (builtins.isInt exponent); + assert builtins.isInt base && builtins.isInt exponent; assert exponent > 0; - builtins.foldl' (x: _: x * base) 1 (builtins.genList (_: _) exponent); + exponent |> builtins.genList (_: _) |> builtins.foldl' (x: _: x * base) 1; mkTcpMem = min: ini: max: @@ -53,7 +53,7 @@ dir: dir |> builtins.readDir - |> (lib.mapAttrsToList ( + |> lib.mapAttrsToList ( name: type: let modulePath = dir + "/${name}"; @@ -64,7 +64,7 @@ [ (lib.nameValuePair name modulePath) ] else [ ] - )) + ) |> lib.concatLists |> lib.listToAttrs; -- cgit 1.4.1