Advertisement
Vladi1442

Untitled

Jun 5th, 2022
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. recommender :: Playlist -> (Song -> SongName)
  2. recommender' pls = helper sng
  3.    where
  4.        helper :: Song -> SongName
  5.        helper song
  6.            | rs == [] = song
  7.            | otherwise = fst $ dropWhile (Song -> r) rs
  8.  
  9.        authName :: Song -> AuthorName
  10.        authName song = map (\(Song aut _ _ _) -> aut) song
  11.  
  12.        rs :: SongName
  13.        rs = getNextSong $ song
  14.  
  15.        getNextSong :: Song -> SongName
  16.        getNextSong song = dropWhile ((song /= pl) -> pl) pls
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement