Add divisor generator

This commit is contained in:
Rodrigo Arias 2020-11-16 11:59:11 +01:00
parent e0ca33569b
commit 433c8864ea

View File

@ -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);