Oct 3, 2003 ------------- - More on ML functions - how ML does type inference in functions - pretty cool! - list functions - reversing a list - summing elements of a list - use of patterns in function arguments - importance of being constructive - x@y not a good pattern - importance of being exhaustive - just having cases for nil and ([a]) not enough - Codes written today fun reverse(nil) = nil | reverse(x::xs) = reverse(xs)@[x]; fun summing(nil) = 0 | summing(x::xs) = x + summing(xs);