module Exercise_6 where import Data.Ratio {-WETT-} traceFractran :: [Rational] -> Integer -> [Integer] traceFractran rs n = n : concat (take 1 [rs `traceFractran` floor (fromIntegral n * r) | r <- rs, n `mod` denominator r == 0]) {-TTEW-}