module Exercise_6 where import Data.Ratio {-WETT-} traceFractran :: [Rational] -> Integer -> [Integer] traceFractran rs n = if l == [] then [n] else n : traceFractran rs (round(head l * fromInteger n)) where l = filter (\x -> n `mod` denominator x == 0) rs {-TTEW-}