import Control.Monad.State
import Control.Parallel.Strategies
import Mandelbrot

render :: [[ Char ]]
render = do
    let evalPoint z = evalState (mandelbrot z) (0,(0.0,0.0))
    let innerPar l = map evalPoint l `using` parBuffer 1000 rdeepseq
    map innerPar grid `using` parBuffer 1000 rdeepseq

main :: IO()
main = do
    mconcat $ putStrLn <$> render
