IC
n
let inline factorial< ^a when (^a or bigint): (static member op_Implicit : ^a -> bigint)> (n: ^a) : bigint =
let rec factorial' (p : bigint) =
match p with
| x when x <= 1I -> 1I
| _ -> p * factorial' (p - 1I)
let bi : bigint = (*call op_Implicit here*) n
factorial' bi