Created
October 24, 2013 22:15
-
-
Save tautologico/7146082 to your computer and use it in GitHub Desktop.
Test of length and sum for integer lists.
This file contains hidden or 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
fn main() | |
{ | |
let l1 = @Cons(5, @Cons(3, @Cons(7, @Empty))); | |
println!("length of l1 is {}", length(l1)); | |
println!("sum of l1 is {}", sum_list(l1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment