BestApproximationDiv2 problem in Haskell
Hmmm, not much ideas, only syntax:

showResult :: (Int, Int, Int) -&gt; String
showResult (a, b, x) = concat [show a, "/", show b, " has ", show x, " exact digits"]


preciseDivision :: Int -&gt; Int -&gt; [Int]
preciseDivision a b = let (d,r) = divMod (10*a) b in d : preciseDivision r b 


...where toResult ds p b = fmap (\a -&gt; (a, b, 1 + length ds)) $ bestNumerator ds p b