lec4 Scope functions and data

4 4 intlist c 4 4 8

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: $ + -! ! % , " " $ + , , D ' 8 0 " 0 6 -! $ -$ + -! ! % , " " $ + , , D ' 1 + - ,$ - ' 1 + - ,$ - match-with match e C1 x1 | C2 x2 | ... | Cn xn with -> e1 -> e2 -> en -! 9 , , match-with match e C1 x1 | C2 x2 | ... | Cn xn with -> e1 -> e2 -> en type C1 | C2 | ... | Cn t = of t1 of t2 of tn :1! C e14 e2,...,en '? 1! , / " -! 1! * * + ! + + 6 3 / 3 6 % , ,1 / , 6$ + t" " ? $ # " & 1! C A $ 6 @ type int_list = Nil | Cons of int * int_list datatype int_list = Nil | Cons of int * int_list : % $ ;4 ;4 @? ; 4= <<< " ;4 , int_list C ; 4= << ; 4= < = * *8 * :: + 6 , 6 , " " + 1! $ @ ! ! 1/ 1 1/ 1 1# & 1 #= & 6 , ! " ! let rec len l = match l with Nil ->...
View Full Document

Ask a homework question - tutors are online