Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. let rec countAndRemove currentCars resultCars (x1,x2,x3) count =
  2. match currentCars with
  3. | [] -> (resultCars, count)
  4. | (h1,h2,h3)::t -> if(h1==x1 && h2==x2) then countAndRemove t resultCars (x1,x2,x3) (count+1)
  5. else countAndRemove t ((h1,h2,h3)::resultCars) (x1,x2,x3) count
  6. in let (l1,a1) = countAndRemove filteredCars [] (cars1,cars2,cars3) 0
  7. in countApperiance l1 ((cars1,(cars2,a1))::result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement