A set of challenges for jump starting your understanding of monads.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Again, create a Monad
instance for your []
type. Import your Card
data constructor from Set 3. Using do syntax, implement the following functions:
allPairs :: [a] -> [b] -> [(a,b)]
allCards :: [Int] -> [String] -> [Card]
allCombs3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]