Skip to content

Instantly share code, notes, and snippets.

@lontivero
Created November 3, 2022 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lontivero/ac4d86d060ae468f703e60bd62c12b42 to your computer and use it in GitHub Desktop.
Save lontivero/ac4d86d060ae468f703e60bd62c12b42 to your computer and use it in GitHub Desktop.
Generate Wasabi Standard denominarions
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