Created
December 5, 2016 15:46
-
-
Save kali/2c7792f9d30c62692c4467efe1ae41cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<I> ModularArithmetic for I | |
where | |
I: Clone + Sized, | |
I: Zero + One + Neg<Output=I> + NumberTests, | |
for<'a> &'a I: Mul<I, Output=I>, | |
for<'a,'b> &'a I: Mul<&'b I, Output=I>, | |
for<'a,'b> &'a I: Div<&'b I, Output=I>, | |
for<'a> I: Rem<&'a I, Output=I>, | |
for<'a,'b> &'a I: Rem<&'b I, Output=I>, | |
for<'a,'b> &'a I: Add<&'b I, Output=I>, | |
I: Sub<I, Output=I>, | |
for<'b> I: Sub<&'b I, Output=I>, | |
for<'a,'b> &'a I: Sub<&'b I, Output=I>, | |
I: Shr<usize, Output=I>, | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment