Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.58 KB | None | 0 0
  1. let rec matchInterest s xs =
  2.     match (s,xs) with
  3.     |(_,[]) -> false
  4.     |(s, xs::xs') -> if(xs = s) then true
  5.                     else matchInterest s xs';;
  6.  
  7.  
  8. let rec p2 desc =
  9.     match desc with
  10.     |(_, by, ths) ->    if(by > 1982 &&
  11.                             (matchInterest "soccer" ths ||
  12.                                 matchInterest "jazz" ths))
  13.                          then true
  14.                          else false;;
  15.  
  16.  
  17.  
  18. let rec extractInterested p r =
  19.     match (p, r) with
  20.     |(_, []) -> []
  21.     |(p', (name,(no,by,ths))::r')  ->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement