Software Engineering discussion

14 views
Learn You a Haskell > Syntax in Functions

Comments Showing 1-3 of 3 (3 new)    post a comment »
dateUp arrow    newest »

message 1: by [deleted user] (new)

There are a lot fundamental Haskell concepts crammed into this chapter. It is one that I will have to refer back to in the future, because I haven't been able to keep guard, where, let, and case distinct in my head.

I don't think that the book explicitly stated this yet, but the pattern [x:xs] is a common one, where x is the first item in the list, and the xs (literally, more than one x or plural) is the remainder of the list. This singular/plural distinction is just a variable naming convention, but a common and useful one.


message 2: by Aleksander (new)

Aleksander Shtuk | 84 comments Online version of this book contains a note in this chapter saying that x:xs pattern is used a lot, especially with recursive functions, which was somewhat implied in one of the previous chapters.

I wish this book contained some exercises at the end of each chapter that would allow readers to get some taste of Haskell and at the same time systematically consolidate studied material in chapter with the material already covered in previous chapters. I really like author’s writing style; I bet the exercises would be fun too.


message 3: by [deleted user] (new)

I agree. Reading about a language and trying to write a program in it are two very different things.


back to top