blob: 3d307f2f2146e15df36d1417cee042816b824ad1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
module Model.Resume
( Resume(..)
, getNewResumes
, getURLs
) where
import Data.List ((\\))
import Data.Text (Text)
import qualified Data.Text as T
import Model.URL
data Resume = Resume
{ name :: Text
, price :: Maybe Text
, url :: URL
} deriving (Eq, Read, Show)
getNewResumes :: [URL] -> [Resume] -> [Resume]
getNewResumes viewdURLs resumes =
let newURLs = (getURLs resumes) \\ viewdURLs
in filter (\resume -> elem (url resume) newURLs) resumes
getURLs :: [Resume] -> [URL]
getURLs = map url
|