This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-- 1 | |
1 1 | |
1 2 1 | |
1 3 3 1 | |
1 4 6 4 1 --} | |
-- printRow :: (Integral a, Show a) => a -> [a] -> IO () | |
printRow :: Int -> [Int] -> IO () | |
printRow pad nums = do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Char | |
import Data.Maybe | |
import Data.List | |
import Data.Map hiding (map) | |
import Text.Printf | |
main :: IO () | |
main = do | |
(src :: String) <- readFile "grades.txt" :: IO String | |
let pairs = map (\x -> split (words x)) ((lines src) :: [String]) :: [(String,Int)] |