Created
July 15, 2012 17:36
-
-
Save iamtakingiteasy/3117837 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
import io::*; | |
import to_str::*; | |
impl <T : to_str copy> of to_str for ~[mut T] { | |
fn to_str() -> str { | |
let tmp = copy self; | |
tmp.map(|x| { x.to_str() }).to_str() | |
} | |
} | |
fn main() { | |
println((~[mut 1, 2, 3]).to_str()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment