spatial 2017-03-05 23:59:40
readfromarray = do { a <- createarray; liftIO (runReaderT readvalue 1 a) } That throws error is I pass '1'
spatial 2017-03-06 00:00:43
:-) An imperative programmer struggling with Haskell.
dminuoso 2017-03-06 00:01:27
spatial: The weird thing is, I just started with Haskell after having dived into React + Redux hardcore. Suddenly the whole concept of functional programming seemed quite intuitive right from the get-go.
dminuoso 2017-03-06 00:01:47
Though grokking redux reducers was a bit of a PITA.
dminuoso 2017-03-06 00:01:47
:-)
spatial 2017-03-06 00:01:59
OCaml was like that for me. Not Haskell
spatial 2017-03-06 00:02:37
I wasn't prepared for Monad.
spatial 2017-03-06 00:05:32
You mean Redux is written in Haskell ?
spatial 2017-03-06 00:24:15
readfromarray = do { a <- createarray; liftIO (runReaderT (readvalue 1) a) } writetoarray = do { a <- createarray; liftIO (runReaderT (writevalue 1 2) a) }
spatial 2017-03-06 00:24:46
In this 'a', the array is shared only if used within the same function ?
spatial 2017-03-06 00:25:23
No global ?
V3 2017-03-06 00:26:41
Unhammer, thanks, done.