writePPM :: String -> Int -> Int -> [Color] -> IO ()
writePPM file width height pixels = do
    let magic    = "P3"
    let params   = unwords [show x | x <- [width, height, 255]]
    let p3pixels = map p3color pixels
    let outData  = unlines ([magic, params] ++ p3pixels)
    writeFile file outData
    return ()
writePPM :: String -> Int -> Int -> [Color] -> IO ()
writePPM file width height pixels = do
    let magic    = "P3"
    let params   = unwords [show x | x <- [width, height, 255]]
    let p3pixels = map p3color pixels
    let outData  = unlines ([magic, params] ++ p3pixels)
    writeFile file outData
    return ()
writePPM file width height pixels = do
    let magic    = "P3"
    let params   = unwords [show x | x <- [width, height, 255]]
    let p3pixels = map p3color pixels
    let outData  = unlines ([magic, params] ++ p3pixels)
    writeFile file outData
    return ()