I hereby claim:
- I am vasanthaganeshk on github.
- I am salad111 (https://keybase.io/salad111) on keybase.
- I have a public key ASDvF9UH8KKX49JH0SaTqqbUBGtzqzC1D7wHAjSr_0zMPgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
main = do | |
b <- newImage (w, h) | |
c <- foldM (\x y-> setPixel y 1000 x) b [(1,1), (2,2)] | |
savePngFile "/mandlebrot.png" c |
<interactive>:24:22: error: | |
• Couldn't match type ‘()’ with ‘Image’ | |
Expected type: IO Image | |
Actual type: IO () | |
• In the expression: setPixel y 1000 x | |
In the first argument of ‘foldM’, namely | |
‘(\ x y -> setPixel y 1000 x)’ | |
In a stmt of a 'do' block: | |
c <- foldM (\ x y -> setPixel y 1000 x) b [(0, 0), (1, 1)] |
-------------------------------------------------------------------------------- | |
-------------------------------------------------------------------------------- | |
-- Banking simulation | |
-------------------------------------------------------------------------------- | |
-------------------------------------------------------------------------------- | |
import Control.Monad | |
import System.Random | |
-------------------------------------------------------------------------------- |