Blog ยป News ยป Functional Programming Course Released

Functional Programming Course Released

By Lane Wagner on Oct 19, 2020

We just launched our new “Learn Functional Programming” course, and frankly, I’m a bit exhausted (more on that later). This course is an interactive code-in-the-browser course that teaches the basics of FP in JavaScript and PureScript.

To celebrate this launch, we will be offering the course for free on signup (using the 250 free signup gems) for the entire month of October! Even if you can’t take the course this month, be sure to create an account and claim the offer :)

What’s In the Course?

There are 5 modules:

  • Recursion
  • Pure Functions
  • Data Structures
  • PureScript
  • Higher Order Functions

The goal of the course is to cover the basics of FP in such a way that students can implement the concepts in any language, framework, or even just for theoretical practice. We go over functional versions of various algorithms and data structures, learn the difference between imperative and functional paradigms, and learn to curry functions using PureScript syntax.

The course has ~60 exercises currently, and like all of our courses, we will be adding to it and improving the quality regularly.

Come to the dark side

HTML Courses

Regards and sorry for the interruption, Lane here! I built to give you a place to learn back-end development the...hard way? I mean easy? Maybe the "heasy" way? I don't know.

It's hard because you will have to write code... like a metric ton of code. It's easy because my courses have a built-in game that's pretty darn fun. Give it a try.

What the Hell is PureScript?

PureScript is a strongly-typed purely functional programming language that compiles to JavaScript. PureScript has a very Haskell-like syntax and you can play around with it on our PureScript playground here.

Example PureScript:

import Prelude
import Effect.Console (log)

greet :: String -> String
greet name = "Hello, " <> name <> "!"

main = log (greet "World")

I was originally intending this course to be written completely in JavaScript. The platform already supported JavaScript and I thought I would be able to convey all of the basic FP concepts through JS, at least to a satisfactory degree.

I was wrong.

There are so many concepts that are hard to understand in functional programming if the language allows you to circumvent each rule. For example, in JavaScript you can write an immutable stack by exposing some functions:

function push(stack, s){
    newStack = []
    for (const item of stack){
    return newStack

function pop(stack){
    newStack = []
    for (const item of stack){
    return newStack

function peek(stack){
  if (stack.length > 0){
      return stack[stack.length-1]
  return null

The problem is there is nothing stopping another developer (or yourself) from “breaking the rules” and mutating the array later. That’s why I decided to teach myself some PureScript and implement it as part of the program!

I still think JavaScript has a useful part to play in the course, however, especially with the popularity of FP in front-end code. For example, take a look at Ramda and React Hooks.

Anyhow, be sure to take a look at the course and as always let us know how we can improve!

Find a problem with this article?

Report an issue on GitHub