Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec matchInterest s xs =
- match (s,xs) with
- |(_,[]) -> false
- |(s, xs::xs') -> if(xs = s) then true
- else matchInterest s xs';;
- let rec p2 desc =
- match desc with
- |(_, by, ths) -> if(by > 1982 &&
- (matchInterest "soccer" ths ||
- matchInterest "jazz" ths))
- then true
- else false;;
- let rec extractInterested p r =
- match (p, r) with
- |(_, []) -> []
- |(p', (name,(no,by,ths))::r') ->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement