Want to apply functional programming in JavaScript?

Functional Programming is All the Rage!

Seriously though, functional programming concepts even when applied to non-functional programming languages have a number of advantages including easier testing, more stable code (fewer bugs), and easier human comprehension.

Obligatory non-inclusive hipster startup photo

Let's Get Started!

This website is a project site for UIUC’s CS 421 course in Programming Languages and Compilers. It is somewhat inspired by the Learn You a Haskell website which was a fundamental resource for the course. This site takes a theoretical, practical, and hopefully comedic approach to applying functional programming concepts to common Javascript and NodeJS patterns and problems.

programmer working
How you feel at the start of the semester.

Chapter 00

Introduction to Functional Programming

In this chapter we introduce functional programming and give some theory and background as to why it’s a “thing.” What’s all the buzz about? How different is it from “regular” programming. Why should I even bother? Can I write functionally in nonfunctional languages?

Chapter 01

Pure Functions: Side Effects and Immutability

One of the central tenants of functional programming is the lack of side effects and immutability of variables. This chapter covers these concepts with examples from NodeJS scripts.

stop the domino
meditation

Chapter 02

First-Class, Higher-Order, and Lambda Functions

Nobody wants to be second class and that includes functions! In this chapter we will dive into the different kinds of functions used in Javascript and see how they borrow from functional languages like Haskell.

Chapter 03

Currying & Composition

Oh great, another CS concept that doesn’t have a practical use in my coding job. Hold on there cowboy! In this chapter, we’ll explain currying and deconstruct a basic curry transformation along with explaining the awesomeness of composition. 

change
head scratching man
How you feel after a semester of Haskell.

Chapter 04

Advanced Concepts

In this chapter, we’ll cover some advanced concepts that may-or-may-not be used (or even well understood) by your average web software engineer. These topics include recursion, practical functional NodeJS, and front end framework considerations.

About the Author

Brandon

Brandon Ching, PhD

My name is Brandon Ching and I am the creator of this project website. What should be painfully obvious to my CS professors and graders that the PhD after my name is quite obviously NOT in a technical field. Despite this, I have worked in the web software and cloud engineering space for over 15 years now. I was a token software engineer for around 10 years and have spent the past five or so in some form of management/leadership position.