Add divisor generator
This commit is contained in:
parent
e0ca33569b
commit
433c8864ea
@ -57,6 +57,9 @@ let
|
|||||||
in
|
in
|
||||||
_divList N;
|
_divList N;
|
||||||
|
|
||||||
|
# A list of all divisors of n, sorted in increased order:
|
||||||
|
divisors = n: filter (x: (mod n x == 0)) (range 1 n);
|
||||||
|
|
||||||
# Generates a set given a list of keys, where all values are null.
|
# Generates a set given a list of keys, where all values are null.
|
||||||
genNullAttr = l: genAttrs l (name: null);
|
genNullAttr = l: genAttrs l (name: null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user