Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec countAndRemove currentCars resultCars (x1,x2,x3) count =
- match currentCars with
- | [] -> (resultCars, count)
- | (h1,h2,h3)::t -> if(h1==x1 && h2==x2) then countAndRemove t resultCars (x1,x2,x3) (count+1)
- else countAndRemove t ((h1,h2,h3)::resultCars) (x1,x2,x3) count
- in let (l1,a1) = countAndRemove filteredCars [] (cars1,cars2,cars3) 0
- in countApperiance l1 ((cars1,(cars2,a1))::result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement