4 ms·
When I was new to Haskell (and also not an experienced programmer), the following example on “functional style” had a huge positive impact on me -- where the sa
by ssivark 6y ago
When I was new to Haskell (and also not an experienced programmer), the following example on “functional style” had a huge positive impact on me -- where the same program is re-written in ten different ways, each time making it more modular & composable: http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/ http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way...
(section 3.1... Feel free to ignore everything before/after that)
It feels so much easier to both understand and modify the evolved version of the code.
- behnamoh 6y agoThe whole blog seems fun to read and informative!
- jlg23 6y agoThanks a lot, this is a link to hand to aspiring FP programmers for the content is well presented. This one made me laugh out loud: "This is sometimes called parametric polymorphism. It’s also called having your cake and eating it too."
- Akronymus 6y agoI love the "modifying version 1 is left as an exercise to the viewer." And I'll definitely read more of that blog.