(args: PosArgs<ArgIndex>)
| 788 | |
| 789 | #[pyfunction] |
| 790 | fn lcm(args: PosArgs<ArgIndex>) -> BigInt { |
| 791 | let ints: Vec<_> = args |
| 792 | .into_vec() |
| 793 | .into_iter() |
| 794 | .map(|x| x.into_int_ref()) |
| 795 | .collect(); |
| 796 | let refs: Vec<_> = ints.iter().map(|x| x.as_bigint()).collect(); |
| 797 | pymath::math::integer::lcm(&refs) |
| 798 | } |
| 799 | |
| 800 | #[pyfunction] |
| 801 | fn factorial(x: PyIntRef, vm: &VirtualMachine) -> PyResult<BigInt> { |