Created
November 3, 2022 12:33
-
-
Save lontivero/ac4d86d060ae468f703e60bd62c12b42 to your computer and use it in GitHub Desktop.
Generate Wasabi Standard denominarions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pow b (e:int) = float b ** e |> int64 | |
let in_range xs = xs |> Seq.takeWhile (fun x -> x <= 137438953472L) |> Seq.toList | |
let powers_of b = Seq.initInfinite (pow b) |> in_range | |
let (*) (cs:int64 list) (vs:int64 list) = vs |> List.collect (fun v -> [for c in cs -> c * v]) | |
[1 ] * powers_of 2 @ | |
[1; 2 ] * powers_of 3 @ | |
[1; 2; 5] * powers_of 10 | |
// print them in order | |
|> List.distinct | |
|> List.sort | |
|> List.skipWhile (fun x -> x < 5000L) | |
|> List.iter (printf "%i ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment