module Playground08 where
import qualified Data.Text.All as T

-- Using map 8.1
reverseMyDogs :: [[a]] -> [[a]]    
reverseMyDogs dogs = map reverse dogs


filterMyDogs :: [String] -> [String]
filterMyDogs dogs = filter (\ x -> (T.toLower (T.pack x)) == (T.toLower ( T.pack "Axel")) ) dogs

-- Folding a list 8.4

foldMyDogs :: Foldable t => t [a] -> [a]
foldMyDogs dogs = foldl (++) [] dogs

myReverse :: Foldable t => t a -> [a]
myReverse xs = foldl rcons [] xs
    where rcons x y = y:x
