myTakeWhile_fold2 :: (a -> Bool) -> [a] -> [a]
myTakeWhile_fold2 f = (foldr step []) . map (\ a -> (f a, a))
  where
    step (True,  a) l = a:l
    step _ l = l


-- Ex 05:
myTakeWhile_fold2 :: (a -> Bool) -> [a] -> [a]
myTakeWhile_fold2 f = (foldr step []) . map (\ a -> (f a, a))
  where
    step (True,  a) l = a:l
    step _ l = l


-- Ex 05:
myTakeWhile_fold2 f = (foldr step []) . map (\ a -> (f a, a))
  where
    step (True,  a) l = a:l
    step _ l = l


-- Ex 05: