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