garlic tools: rename divList -> halfList
This commit is contained in:
parent
65918bca21
commit
e0ca33569b
@ -51,7 +51,7 @@ let
|
|||||||
|
|
||||||
# Generates a list of integers by halving number N until it reaches 1. Is
|
# Generates a list of integers by halving number N until it reaches 1. Is
|
||||||
# sorted from the smallest to largest.
|
# sorted from the smallest to largest.
|
||||||
divList = N:
|
halfList = N:
|
||||||
let
|
let
|
||||||
_divList = n: if (n == 0) then [] else (_divList (n / 2)) ++ [ n ];
|
_divList = n: if (n == 0) then [] else (_divList (n / 2)) ++ [ n ];
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user