1
Fork 0
mirror of https://github.com/RGBCube/AdventOfCode synced 2025-07-26 03:27:44 +00:00

Use tail function

This commit is contained in:
RGBCube 2023-12-02 17:55:19 +03:00
parent ba2414968e
commit 3b843970e6
No known key found for this signature in database

View file

@ -7,7 +7,7 @@ with builtins; with lib; rec {
maxRGB
else getMaxRGB {
maxRGB = mapAttrs (name: max (head rgbs).${name} or 0) maxRGB;
rgbs = sublist 1 (length rgbs - 1) rgbs;
rgbs = tail rgbs;
};
makeOneIfZero = number: if number == 0 then 1 else number;