There are some great beginner's books out there that barely cover functional constructs (e.g. PragProg's 'Learn to Program'). But I have always felt that such an omission is really a bad mistake. map/fold/filter introduce two very important ideas:
- Higher-order functions
- Many tasks are just list transformations
What makes things more painful is that Java is so omnipresent in CS education. Since Java only contains such concepts implicitly (and require a lot of verbosity), I haven't encountered many (if any) Java books that go into functional concepts.
It's like learning UNIX without covering pipes. Sure, you can work with UNIX, inadvertently emulate it using redirections from and to files. But it will never be as effective.
Sure, that's why Graham Hutton can do it in one chapter. Most books discuss lists and functions anyway, and from there is not such a big step to give an introduction to lambdas/closures, maps, folds, and filters.
It's not as if we are discussing monads (which are also easy to understand, given a good teacher).
- Higher-order functions
- Many tasks are just list transformations
What makes things more painful is that Java is so omnipresent in CS education. Since Java only contains such concepts implicitly (and require a lot of verbosity), I haven't encountered many (if any) Java books that go into functional concepts.
It's like learning UNIX without covering pipes. Sure, you can work with UNIX, inadvertently emulate it using redirections from and to files. But it will never be as effective.