Skip to content

Instantly share code, notes, and snippets.

View vasanthaganeshk's full-sized avatar

Vasantha Ganesh Kanniappan vasanthaganeshk

View GitHub Profile
@vasanthaganeshk
vasanthaganeshk / holmusk.hs
Created July 4, 2020 15:55
Banking simulation
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Banking simulation
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
import Control.Monad
import System.Random
--------------------------------------------------------------------------------
@vasanthaganeshk
vasanthaganeshk / error.txt
Created August 30, 2019 05:24
Type error mandlebrot
<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)]
main = do
b <- newImage (w, h)
c <- foldM (\x y-> setPixel y 1000 x) b [(1,1), (2,2)]
savePngFile "/mandlebrot.png" c

Keybase proof

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: