I'm at a crossroads in my Haskell study

Submitted by metaperl on Thu, 11/30/2006 - 11:21am.

Chapter 7 in SJT is "Defining functions over lists" --- this is arguably the meat-and-potatoes chapter of the entire book, and it has some great exercises.

However, I was a bit concerned with the given implementation of split because it went over the same part of the list twice:

split :: String -> [Word]
split [] = []
split st
  = (getWord st) : split (dropSpace (dropWord st))
which lead me to examining the source in the Haskell prelude

It looks interesting. So I'm pondering whether to study the entire prelude or continue on with the text.

I think the book is better for me, so that I can learn more of the Haskell system - modules, type classes, infinite lists, monads, algorithm analysis.

It will make me a complete programmer, ready for other interesting articles and exercises and contributions to the Haskell community.

Submitted by metaperl on Thu, 11/30/2006 - 3:40pm.

BLog one way, do another

I was a bit fed up with doing SJT's book, so my eyes began to eye the Prelude. And hey, it's not too long and it's pretty stimulating.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.