Skip to content

Instantly share code, notes, and snippets.

@tautologico
Created October 24, 2013 22:15
Show Gist options
  • Save tautologico/7146082 to your computer and use it in GitHub Desktop.
Save tautologico/7146082 to your computer and use it in GitHub Desktop.
Test of length and sum for integer lists.
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