Browse Source

shorter code with the same error.

Lucas Stadler 11 years ago
parent
commit
4c258b6917
1 changed files with 1 additions and 5 deletions
  1. 1 5
      rust/pointers.rs

+ 1 - 5
rust/pointers.rs

119
    }
119
    }
120
120
121
    // pub fn from_iterator<'a, I: Iterator<A>, A: 'a>(mut i: I) -> &'a List<'a A> {
121
    // pub fn from_iterator<'a, I: Iterator<A>, A: 'a>(mut i: I) -> &'a List<'a A> {
122
    //     let mut xs = &Nil;
123
    //     for x in i {
124
    //         xs = &cons(x, xs);
125
    //     }
126
    //     xs
122
    //     i.fold(&Nil, |xs, x| &cons(x, xs))
127
    // }
123
    // }
128
124
129
    pub fn run() {
125
    pub fn run() {