I first heard of Haskell while in college. I learned that it is a functional programming language, like Lisp. And that was the end of the story. Later, when I started working, I kept hearing a lot of praise of Lisp and even played a little with car and cdr and cons (Scheme in particular), but that was pretty much it, and a long time ago (Go here if you want to know how those names came to be). Recently (OK, yesterday) Haskell reappeared on my radar. Maybe because I discovered this online tutorial, and liked the look of it. I mean, cartoons!! So started reading. Haven't finished yet, but I already think it's quite good. Here's a program to compute the pairs of amicable numbers (OEIS: A063990).
Cutting the long story short, I am enjoying Haskell. I don't think I get the functional thingy yet, and I am not sure if I'll ever use it professionally. And while we are at it, I am also not sure how deep I will go. But one thing for sure, I am having fun, and that is pretty important.
Enjoy!!
[For the interested, there are quite a few good online resources for learning Haskell. In addition to the tutorial I mentioned above, there is The Haskell Tutorial, Haskell wikibook, and a series of posts by MarkCC whose writing I generally admire. Please let me know if you know anything else which is good].
Update:
Just discovered this. O'Reilly's Real world Haskell is available online. I don't know how good it is, but it was the Winner of Best Technical Book, Jolt Awards 2009, so it probably is.
* To whom might be a question ;-)
answer = [(a,b) | a <- [1,2..], b <- [sum (proper_divisors a)], a < b && a == sum (proper_divisors b)] where proper_divisors n = [x | x <- [1..(n-1)], n `mod` x == 0]
The thing I find impressive is, it reads almost like the definition written on paper. And while I am sure I've coded it in the most inefficient way possible, it took only about 10 minutes and 168 characters to write. Think about it, by trimming a few unnecessary whitespaces, I can send it over SMS. Bwuhahah :p.*Cutting the long story short, I am enjoying Haskell. I don't think I get the functional thingy yet, and I am not sure if I'll ever use it professionally. And while we are at it, I am also not sure how deep I will go. But one thing for sure, I am having fun, and that is pretty important.
Enjoy!!
[For the interested, there are quite a few good online resources for learning Haskell. In addition to the tutorial I mentioned above, there is The Haskell Tutorial, Haskell wikibook, and a series of posts by MarkCC whose writing I generally admire. Please let me know if you know anything else which is good].
Update:
Just discovered this. O'Reilly's Real world Haskell is available online. I don't know how good it is, but it was the Winner of Best Technical Book, Jolt Awards 2009, so it probably is.
* To whom might be a question ;-)