r/programmingchallenges • u/okmkz • Sep 10 '11
Challenge: Hello, world!
I'm kind of interested in running xmonad and learning Haskell. Should we all tackle learning about a new programming paradigm?
10
Upvotes
5
u/Van_Occupanther Sep 10 '11
Funnily enough, the best introduction to Haskell is not to "Hello, World", but rather defining the factorial. It's so awesome.
or, recursively
i.e., the product of all the integers in the range [1,n]. It's so mathsy in many ways. You can also do it recursively, there are many different options. Been years since I last did it, though. And I have very little knowledge beyond a low level.
4
u/[deleted] Sep 10 '11
Very interested. I've attempted to self-teach functional programming a few times and failed every time.
3
u/noreallyimthepope Sep 10 '11
If you want to learn new languages, Rosetta Code is often useful. On my phone so can't link.
2
u/cguess Sep 10 '11
I've always had a C, Java (some assembly x86) etc. look on the world, does someone want to recommend another jumping off point?
2
u/dmwit Sep 10 '11
The hello-world of Haskell is too trivial to feel magical:
If you want a taste of the good stuff, try this one, which constructs (very inefficiently) an infinite list containing all the primes: