Add remaining haskell book exercises
This commit is contained in:
12
Haskell-book/17/Combinations.hs
Normal file
12
Haskell-book/17/Combinations.hs
Normal file
@@ -0,0 +1,12 @@
|
||||
module Combinations where
|
||||
|
||||
import Control.Applicative (liftA3)
|
||||
|
||||
stops :: String
|
||||
stops = "pbtdkg"
|
||||
|
||||
vowels :: String
|
||||
vowels = "aeiou"
|
||||
|
||||
combos :: [a] -> [b] -> [c] -> [(a, b, c)]
|
||||
combos = liftA3 (\x y z -> (x, y, z))
|
||||
Reference in New Issue
Block a user