     }
 }
 
+extension myList {
+    func getHead<T>(list: myList<T>) -> myList<T> {
+        
+        switch list {
+        case .Nil:
+            return .Nil
+            
+        case let .Cons(x, xs):
+            return .Cons(x, xs)
+        }
+    }
+}
 
 
+


indirect enum myList <A: NumericType> {
    case Nil
    case Cons(head: A, tail: myList<A>)
}



    
    func sum<T: NumericType>(ints: myList<T>) -> T {
        
        switch ints {
        case .Nil:
            return T(0)
            
        case let .Cons(x, xs):
            return x + sum(ints: xs) 
        }
    }
    
    func product<T: NumericType>(ds: myList<T>) -> T {
        
        switch ds {
        case .Nil:
            return T(1.0)
            
        case let .Cons(x, xs):
            return x * product(ds: xs)
        }
    }
    
