mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
bahaghari: reformat codebase
This commit is contained in:
parent
fb634531e4
commit
e5083302b2
@ -5,8 +5,24 @@
|
||||
|
||||
let
|
||||
glyphList =
|
||||
[ "0" "1" "2" "3" "4" "5" "6" "7"
|
||||
"8" "9" "A" "B" "C" "D" "E" "F" ];
|
||||
[
|
||||
"0"
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
"A"
|
||||
"B"
|
||||
"C"
|
||||
"D"
|
||||
"E"
|
||||
"F"
|
||||
];
|
||||
|
||||
baseSet = lib.generateBaseDigitType glyphList;
|
||||
in
|
||||
|
@ -113,7 +113,6 @@ rec {
|
||||
base = 2;
|
||||
glyphSet = { "0" = "0"; "1" = "1"; };
|
||||
conversionTable = { "0" = 0; "1" = 1; };
|
||||
isValidDigit = <function>;
|
||||
fromDec = <function>;
|
||||
toDec = <function>;
|
||||
}
|
||||
@ -169,7 +168,7 @@ rec {
|
||||
iter = product: counter: max-count:
|
||||
if counter > max-count
|
||||
then product
|
||||
else (iter (product * base) (counter + 1) max-count);
|
||||
else iter (product * base) (counter + 1) max-count;
|
||||
in
|
||||
iter 1 1 exponent;
|
||||
}
|
||||
|
@ -95,8 +95,24 @@ pkgs.lib.runTests {
|
||||
|
||||
testGenerateConversionTable2 = {
|
||||
expr = lib.trivial.generateConversionTable
|
||||
[ "0" "1" "2" "3" "4" "5" "6" "7"
|
||||
"8" "9" "A" "B" "C" "D" "E" "F" ];
|
||||
[
|
||||
"0"
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
"A"
|
||||
"B"
|
||||
"C"
|
||||
"D"
|
||||
"E"
|
||||
"F"
|
||||
];
|
||||
expected = {
|
||||
"0" = 0;
|
||||
"1" = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user