Skip to content

Instantly share code, notes, and snippets.

View acw's full-sized avatar

Adam Wick acw

View GitHub Profile
@acw
acw / egcd.rs
Last active March 13, 2018 17:10
Challenge Problem: Find the additional trait constraints on egcd that make this work.
use std::ops::*;
trait Builder {
fn zero() -> Self;
fn is_zero(&self) -> bool;
fn from_u8(x: u8) -> Self;
}
pub fn egcd<S>(a: &S, b: &S) -> (S, S, S)
where

Keybase proof

I hereby claim:

  • I am acw on github.
  • I am acw (https://keybase.io/acw) on keybase.
  • I have a public key ASDArCwml-t-xFVYIvz5h-QDXhXYrRyYqxYBnIJdCkAkiQo

To claim this, I am signing this object: