[ Question ]

What are good resources for learning functional programming?

by mr-hire 1 min read4th Jul 201910 comments


I'm looking to use the 3 Books Technique to learn functional programming. Does anyone have any "What", "Why' or "How" resources for functional programming (or resources that don't fit the categories?)

New Answer
Ask Related Question
New Comment

4 Answers

My favorite book, by far, is Functional Programming in Scala. This book has you derive most of the concepts from scratch, to the point where even complex abstractions feel like obvious consequences of things you've already built.

If you want something more Haskell-focused, a good choice is Programming in Haskell.

Most of my resources are Haskell related.

If you are new to programming, I usually recommend "How to Design Programs". It is the only text I know of that seems to teach people how to design programs, rather than expecting that they'll work it out themselves based on writing code for a few years.

For a starting point for programmers, I usually recommend the Spring 2013 version of CIS194 - "Introduction to Haskell" - from UPenn. The material is good quality and it has great homework. Our meetup group relayed the lectures, so there are videos available here.

"Introduction to Functional Programming using Haskell (2nd Edition)" by Richard Bird is also really good if you want to get some hands on experience with using equational reasoning to prove things about programs, or to partially synthesize programs from their specifications. It is aimed at undergraduates, but is more advanced than CIS194.

"Parallel and Concurrent Programming in Haskell" by Simon Marlow is great for doing more applied work with Haskell, but I'd do CIS194 first.

I currently work for a group that runs free FP courses. There is an introductory course here that can be done on your own but is challenging - we only cover a subset of the content when we actually run the course. There is an applied course here that is easier to tackle without an instructor, but requires that you're comfortable with the concepts from what we teach during the introductory course.

[Disclaimer: I haven't finished it yet]

Haskell Programming From First Principles: Pure functional programming without fear or frustration by Christopher Allen and Julie Moronuki.

The preface explains how Chris wrote it in the process of teaching Julie, an absolute beginner to computer programming, and they refined the material together using that feedback process.

The result I found more approachable than Learn You a Haskell for Great Good, which I had read earlier.

This probably falls in the "How" category. It has exercises. But there is some exposition on the "What" and "Why" as well. If you work though it you should have achieved basic proficiency with the language, which should help you understand any ML-style language, or exposition using similar notation.

Very non-comprehensive, but from things I've read and liked:

How: What I Wish I Knew When Learning Haskell

What: Chris Okasaki, Purely Functional Data Structures