Is there a was to make a function in F# working for each type of number. I would like to pass in a number of a type and get the same type back.
Here a short example:
let Primes max=
let rec loop primes acc=
match acc with
|x::xs -> let filtered = acc |> List.filter (fun y -> y%x <> 0)
loop (x::primes) filtered
|[] -> primes |> List.rev
loop [] [2..max]
Now I can only pass in int32, but I want to pass in uint64 or bigint if necessary.