Skip to content

Instantly share code, notes, and snippets.

@kindlychung
Created September 20, 2016 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kindlychung/fa339cd89bde933e5961a9c7e96fc977 to your computer and use it in GitHub Desktop.
Save kindlychung/fa339cd89bde933e5961a9c7e96fc977 to your computer and use it in GitHub Desktop.
// Give the combination of these traits a name!
trait ZMod: Modulo<Output = Self> + Mul<Output = Self> + Sub<Output = Self> + Add<Output = Self> + Rem<Output = Self> + Copy {}
impl<T> ZMod for T
where T: Modulo<Output = T> + Mul<Output = T> + Sub<Output = T> + Add<Output = T> + Rem<Output = T> + Copy
{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment