Software Engineering discussion

12 views
Learn You a Haskell > Higher-Order Functions

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

message 1: by [deleted user] (new)

Whew, my head hurts after reading this chapter! It covered a lot of ground. When I first heard that Haskell functions only took one parameter, I naturally wondered how this could possibly be true. The answer, explained in this chapter, is currying. I find that this is a hard concept to explain, but once people get it, it is pretty natural to apply. The one case that still causes me to pause is this:

"foo a = bar b a" rewritten as "foo = bar b"

It seems to me that this crosses that narrow line between elegant conciseness and opaque readability, but maybe I just need more practice.

Most of the constructs in the chapter (map, filter, take, fold) are present in most functional languages.

The dot and dollar notation is new to me, and I think it really helps readability by removing so many parenthesis.


message 2: by Aleksander (last edited Jan 26, 2012 03:11PM) (new)

Aleksander Shtuk | 84 comments Discussion of higher order functions reminded me about lambda calculus. A year a go I attended Dale Schumacher’s lecture about his language Humus. Back then I didn’t get too much understanding of language itself, but I learned many programming language terms like an actor, lambda, and so on, that I did some more research on Internet later. I think understanding lambda calculus can help readers to understand higher order functions, currying, and binding more quickly and could be mentioned in this book. I guess that depends on a source. I liked the following lambda calculus tutorial:

https://files.nyu.edu/cb125/public/La...


back to top