module Exercise_6 where import Data.Ratio {-WETT-} traceFractran :: [Rational] -> Integer -> [Integer] traceFractran rs n = if null l then [n] else n : traceFractran rs (head l) where l = [numerator p | r <- rs, let p = r * fromIntegral n, denominator p == 1 ] {-TTEW-}