fn len(self) -> u32 {
        /*
         * `self` has to be matched, because the behavior of this method 
         * depends on the variant of `self`
         * `self` has type `&List`, and `*self` has type `List`, matching on a
         * concrete type `T` is preferred over a match on a reference `&T`
         */

        match self {
            // Can't take ownership of the tail, because `self` is borrowed
            // instead take a reference to the tail
            // We don't care about the element, so _
            Cons(_, tail) => 1+tail.len(),
            // Base case: An empty list has zezro length
            Nil => 0
        }
    }
// Return the length of the list
Return the length of the list
Return the length of the list
fn len(self) -> u32 {
        /*
         * `self` has to be matched, because the behavior of this method 
         * depends on the variant of `self`
         * `self` has type `&List`, and `*self` has type `List`, matching on a
         * concrete type `T` is preferred over a match on a reference `&T`
         */
        match self {
            // Can't take ownership of the tail, because `self` is borrowed
            // instead take a reference to the tail
            // We don't care about the element, so _
            Cons(_, tail) => 1+tail.len(),
            // Base case: An empty list has zezro length
            Nil => 0
        }
    }
fn len ( self ) -> u32 { /*
         * `self` has to be matched, because the behavior of this method 
         * depends on the variant of `self`
         * `self` has type `&List`, and `*self` has type `List`, matching on a
         * concrete type `T` is preferred over a match on a reference `&T`
         */ match self { // Can't take ownership of the tail, because `self` is borrowed // instead take a reference to the tail // We don't care about the element, so _ Cons ( _ , tail ) => 1 + tail . len ( ) , // Base case: An empty list has zezro length Nil => 0 } }
Return the length of the list
Return the length of the list
self
self