Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let hd (x::xs) = x
- let tl (x::xs) = xs
- let rec delete x ls1 = match ls1 with
- | [] -> []
- | x1::tl -> if x1 = x then delete x tl else x1::(delete x tl)
- | x1::[] -> if x1 = x then delete x [] else [x1]
- delete 7 [7;8;23;7;9;2]
Add Comment
Please, Sign In to add comment