import interface Hashable from hash; import interface Castable from cast; fn hash(n: Float) -> Int { return floor(*n); } fn cast(b: Bool) -> Int { return hash(*b); } implement Hashable for Float; implement Castable for Bool; fn for_hashable(a: 'T [Hashable]) {} fn for_castable(a: 'T [Castable<'G>]) {} for_hashable(3); for_hashable(3.5); for_hashable(true); for_castable(true); for_castable(5.5);