Skip to content

Some functional programming resources #35

@phucledien

Description

@phucledien

The Structure and Interpretation of Computer Programs

By Harold Abelson, Gerald Jay Sussman, and Julie Sussman
SICP is famous enough it almost needs no introduction. The book dives deep into fundamental programming principles before moving on to designing and implementing a programming language. The book uses Scheme, a dialect of Lisp. While the Lisp family has mythical status in the programmer community, it is a straightforward language with a basic structure and syntax that can be learned in a few minutes.

This book is very dense, and it will take a while to understand the contents fully, but it is well worth it. Fortunately, video lectures from the authors are available for free on YouTube to help you get through the material. If you don’t like the authors’ teaching styles, this book has been covered many times on YouTube. The book is available in print and for free under the Creative Commons.

[Print] [Web] [HTML5/epub] [PDF] [Video Lectures]

Category Theory for Programmers

By Bartosz Milewski
Category theory examines the underlying structure of mathematics and logic through “objects” and “arrows” (also called “morphisms”). For programmers, category theory can serve as a roadmap to new ways to manipulate code and how different data structures and functions relate. This book answers what things like a “monad” or a “functor” are and why they are essential concepts. Code examples are in Haskell (more on that below) and, much more verbosely, C++.

Like SICP, this book has a series of free lectures on YouTube, and Milewski is an excellent teacher while demystifying this obscure branch of mathematics. This book was also released under the Creative Commons.

[Print] [Web] [PDF] [Video Lectures Part 1] [Video Lectures Part 2] [Video Lectures Part 3]

Learn You a Haskell for Great Good!

By Miran Lipovaca
Haskell is a reasonably simple functional language that feels more like mathematics than any other language I have seen. In the previous book, Milewski even shows how you can manipulate Haskell functions on paper as though they were algebraic equations!

The Haskell community has actively mined the depths of category theory, making it a good fit for code examples in the previous book. By studying the language, the last book is made more clear. Coincidently, despite being very different languages, Swift was in part influenced by Haskell. It doesn’t take long before you see Haskell’s imprint on Swift.

The book I have selected here is the famous “Learn You a Haskell for Great Good!” The book is easy to read and has been a joy.

[Print] [Web] [PDF]

PointFreeCo

By Brandon Williams and Stephen Celis
Diving into these concepts in functional languages is great, but what about applying these ideas to something more “practical” like Swift? Luckily there is a fantastic set of resources from PointFreeCo.

Brandon Williams and Stephen Celis do a fantastic job in their videos, with very well-done transcripts included, discussing functional programming using Swift. They go over the theoretical concepts, how to implement them in Swift, ask, “what’s the point?” and use the ideas in practical projects.

They publish the libraries they generate on their GitHub, everything from “missing libraries” such as Overture and Prelude to opinionated, but powerful, architecture such as TCA.

Some videos and articles are free, and a subscription for access to everything. The content they cover is extensive, so I believe it is well worth the entry price.

Grokking simplicity

[ebook]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions