prettyprint :: Int ->  M.Map String [(Double,String)] -> (String,String) -> IO ()
prettyprint ml res mis = 
  let vals = fmap (\(a,b) -> (b,a)) 
             . takeWhilePlus (\(v,l) -> l /= (fst mis)) 
             . L.sortBy (\(v1,_) (v2,_) -> compare v2 v1) 
             $ (res M.! (fst mis)) 
  in do putStrLn "-----------------------------"
        putStrLn ""
        putStrLn (idAs ml mis)
        putStrLn ""
        sequence_ (fmap (line (fst mis)) vals)
        putStrLn ""
prettyprint :: Int ->  M.Map String [(Double,String)] -> (String,String) -> IO ()
prettyprint ml res mis = 
  let vals = fmap (\(a,b) -> (b,a)) 
             . takeWhilePlus (\(v,l) -> l /= (fst mis)) 
             . L.sortBy (\(v1,_) (v2,_) -> compare v2 v1) 
             $ (res M.! (fst mis)) 
  in do putStrLn "-----------------------------"
        putStrLn ""
        putStrLn (idAs ml mis)
        putStrLn ""
        sequence_ (fmap (line (fst mis)) vals)
        putStrLn ""
prettyprint ml res mis = 
  let vals = fmap (\(a,b) -> (b,a)) 
             . takeWhilePlus (\(v,l) -> l /= (fst mis)) 
             . L.sortBy (\(v1,_) (v2,_) -> compare v2 v1) 
             $ (res M.! (fst mis)) 
  in do putStrLn "-----------------------------"
        putStrLn ""
        putStrLn (idAs ml mis)
        putStrLn ""
        sequence_ (fmap (line (fst mis)) vals)
        putStrLn ""