Skip to content

Instantly share code, notes, and snippets.

View rahcola's full-sized avatar

Jani Rahkola rahcola

  • Helsinki, Finland
View GitHub Profile
module Kuulaskuri (luo, monesko, seuraava) where
import Data.IORef
newtype Kuulaskuri = Kuulaskuri (IORef Int)
luo :: IO Kuulaskuri
luo = do
c <- newIORef 1
return $ Kuulaskuri c
@rahcola
rahcola / gist:2314574
Created April 5, 2012 22:09
Tyypillinen kuulaskuri
module Kuukausi where
data Kuukausi = Tammikuu
| Helmikuu
| Maaliskuu
| Huhtikuu
| Toukokuu
| Kesäkuu
| Elokuu
| Heinäkuu