module Exercise_5 where import Data.List (partition) {-G5.2-} iter :: Int -> (a -> a) -> a -> a iter n f x = undefined pow :: Int -> Int -> Int pow n k = undefined drop' :: Int -> [a] -> [a] drop' k xs = undefined replicate' :: Int -> a -> [a] replicate' n x = undefined {-G5.3-} partition_rec :: (a -> Bool) -> [a] -> ([a], [a]) partition_rec f xs = undefined partition_filter :: (a -> Bool) -> [a] -> ([a], [a]) partition_filter f xs = undefined prop_partition_rec = undefined prop_partition_filter = undefined {-H5.1-} while :: (a -> Bool) -> (a -> a) -> a -> a while p f x = undefined removeFactorPred :: Integer -> Integer -> Bool removeFactorPred k n = undefined removeFactorStep :: Integer -> Integer -> Integer removeFactorStep k n = undefined -- Ihre Funktionen werden so aufgerufen werden: removeFactor :: Integer -> Integer -> Integer removeFactor k n = while pred step n where pred x = removeFactorPred k x step x = removeFactorStep k x ldPred :: (Integer, Integer) -> Bool ldPred (n,k) = undefined ldStep :: (Integer, Integer) -> (Integer, Integer) ldStep (n,k) = undefined -- Ihre Funktionen werden so aufgerufen werden: ld :: Integer -> Integer ld n = snd (while ldPred ldStep (n, 0)) {-H5.2-} reachable :: Eq a => [(a, a)] -> a -> a -> Bool reachable = undefined {-H5.3-} mapState :: (s -> a -> (b,s)) -> s -> [a] -> ([b], s) mapState = undefined f :: String -> Char -> (Char, String) f = undefined {-H5.4-} {-WETT-} splitSubmissions :: [(a, Integer)] -> ([(a, Integer)], [(a, Integer)]) splitSubmissions = undefined {-TTEW-}