Can you provide some Haskell examples that are cumbersome, then provide an example that isn't in another language of your choice?
Also, have you tried using lens for this?
Can you provide some Haskell examples that are cumbersome, then provide an example that isn't in another language of your choice?
Also, have you tried using lens for this?
https://github.com/jmoy/avb-econ-hs/blob/f6d65af480c99045573...
to that in Julia
https://github.com/jesusfv/Comparison-Programming-Languages-...
Despite the Haskell program using the elegant facilities provided by REPA, the fact that mutable part (the `writePolicy`) has to be written in a different style than the pure parts since it is a monadic action seems cumbersome to me.
> the fact that mutable part (the `writePolicy`) has to be written in a different style than the pure parts since it is a monadic action seems cumbersome to me.
It has to be written differently more because it's using the state monad. You can write monadic actions that resemble pure code, for instance:
> replicateM_ (readFile "/etc/issue")
["Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n","Ubuntu 15.10 \\n \\l\n\n"]