Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. raindrops :: Int -> String
  2. raindrops n = tests id (show n)
  3. where
  4. tests = test 3 "Pling" . test 5 "Plang" . test 7 "Plong"
  5. test d s x | n `mod` d == 0 = const (s ++ x "")
  6. | otherwise = x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement