module Exercise_6 where import Data.Ratio import Data.List import Data.Maybe import Control.Monad import GHC.Num traceFractran::[Rational] -> Integer -> [Integer] {-WETT-} traceFractran rs n = n : fromMaybe [] (traceFractran rs <$> numerator <$> (liftM2 eqInteger truncate numerator) `find` map (fromIntegral n *) rs) {-TTEW-} primeprog::[Rational] primeprog = [17%91 ,78%85 ,19%51 ,23%38 ,29%33 ,77%29 ,95%23 ,77%19 ,1%17 ,11%13 ,13%11 ,15%14 ,15%2 ,55%1]