(args: PosArgs<ArgIndex>)
| 777 | |
| 778 | #[pyfunction] |
| 779 | fn gcd(args: PosArgs<ArgIndex>) -> BigInt { |
| 780 | let ints: Vec<_> = args |
| 781 | .into_vec() |
| 782 | .into_iter() |
| 783 | .map(|x| x.into_int_ref()) |
| 784 | .collect(); |
| 785 | let refs: Vec<_> = ints.iter().map(|x| x.as_bigint()).collect(); |
| 786 | pymath::math::integer::gcd(&refs) |
| 787 | } |
| 788 | |
| 789 | #[pyfunction] |
| 790 | fn lcm(args: PosArgs<ArgIndex>) -> BigInt { |