A card has a type and a color:

```
data CardType = Spades | Clubs | Diamonds | Hearts

data CardColor = Black | Red

cardColor :: CardType -> CardColor

cardColor card =
  case card of Spades -> Black
               Clubs -> Black
               Diamonds -> Red
               Hearts -> Red

type Card = (CardType, CardColor)

```

I want to check whether all the cards have the same color:

```
allTheSameColor :: [Card] -> Bool

allTheSameColor cardList = ???

```

I wonder, how would I do that **without** using any library function such as `filter`? But it's allowed to re-implement it yourself since I want to be able to understand at a deep, functional level how to solve this problem.