3 ms·
This was such a nice read! I've only ever written Java & JavaScript really, and Haskell is always at the top of the list of things I want to learn! When I got
by aurbano 7y ago
This was such a nice read! I've only ever written Java & JavaScript really, and Haskell is always at the top of the list of things I want to learn!
When I got to the 7 line snippet at the end I was blown away by the elegance, and the fact that I couldn't really understand exactly what each thing did. So I decided to spend a few hours going through it character by character and documented my process here [1] in case it was useful to anyone else.
I'll continue by reading a book on Haskell, but open to any advice from anyone on good ways to get into it!
[1] https://aurbano.eu/note/2019-12-18-journey-into-haskell/ https://aurbano.eu/note/2019-12-18-journey-into-haskell/
- mettamage 7y agoFun blog post! I know nothing about Haskell as well. Quite casual, just what I needed. Thanks for writing it up! One blogging tip (note: the rest was perfect): if you would've chopped the following in 2 or 3 lines, then the casual style would be perfect. > primes n = take n $ sieve [2..] where sieve (p:xs) = p : sieve [x | x <- xs, x `rem` p > 0] sieve [] = [] I feel that it'd be really hard to do though.
- aurbano 7y agoThanks! And good idea, I just updated it breaking that down a bit more :)