Skip to content

Instantly share code, notes, and snippets.

View axman6's full-sized avatar

Alex Mason axman6

View GitHub Profile
{-- 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
@axman6
axman6 / gist:1073412
Created July 9, 2011 07:08 — forked from o-sam-o/gist:1073350
Haskell Hack
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)]