Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*Liste predefinite dal linguaggio SML*)
- val empty = []; (*Liste vuota*)
- val numeri = 1::2::3::4::[];
- hd numeri; (*head della lista*)
- tl numeri; (*coda della lista*)
- fun search n lst = if lst = [] then
- false
- else
- if (hd lst) = n then true
- else search n (tl lst);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement