interface Castable { fn cast(obj: Self) -> 'T; } fn cast(n: Float) -> Int { return floor(n); } fn cast(n: Int) -> Float { return n * 1.0; } implement Castable for Int; implement Castable for Float;