Skip to content

Instantly share code, notes, and snippets.

@iamtakingiteasy
Created July 15, 2012 17:36
Show Gist options
  • Save iamtakingiteasy/3117837 to your computer and use it in GitHub Desktop.
Save iamtakingiteasy/3117837 to your computer and use it in GitHub Desktop.
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