fn last<'a, T>(list: &'a [T]) -> Option<&'a T> {
    match list {
        [] => None,
        [.., ref x] => Some(x)
    }
}

fn main() {
    let list = ~['a', 'b', 'c'];
    println!("{:?}", last(list));
    println!("{:?}", list.last()); // Cheat
}

fn last<'a, T>(list: &'a [T]) -> Option<&'a T> {
    match list {
        [] => None,
        [.., ref x] => Some(x)
    }
}

fn main() {
    let list: ~[char] = ~['a', 'b', 'c'];
    println!("{:?}", last(list));
    println!("{:?}", list.last()); // Cheat
}

--- 
+++ 
@@ -6,7 +6,7 @@
 }
 
 fn main() {
-    let list: ~[char] = ~['a', 'b', 'c'];
+    let list = ~['a', 'b', 'c'];
     println!("{:?}", last(list));
     println!("{:?}", list.last()); // Cheat
 }
Remove unnecessary type annotation in Problem 01
