pub fn factorial<T>(n: T) -> T where T: PrimInt + Unsigned + Product,
Calculate factorial from given value.