Skip to content

Instantly share code, notes, and snippets.

@ericqweinstein
Last active May 4, 2016 15:17
Show Gist options
  • Save ericqweinstein/d8cb53cf8d0f31fb19b6 to your computer and use it in GitHub Desktop.
Save ericqweinstein/d8cb53cf8d0f31fb19b6 to your computer and use it in GitHub Desktop.
Wednesday Workshops: Functional Programming Patterns in JavaScript

Wednesday Workshops: Functional Programming Patterns in JavaScript

About

Each workshop is ~45 minutes over lunch on Wednesdays. There will be a repo with sample code and additional resources so you can continue learning outside the workshop if you want to.

Curriculum

We'll be using Michael Fogus' Functional Programming in JavaScript as a loose guide. I'll provide you with an electronic copy (EPUB, MOBI, or PDF).

Intro

  • What is functional programming? (10 min)
  • First-class functions (10 min)
  • Applicative programming (15 min)
  • Data thinking (10 min)

Scope and Closures

  • Global vs. function scope (10 min)
  • Lexical vs. dynamic scope (10 min)
  • Closures (25 min)

Higher-Order Functions

  • Functions that take other functions as arguments (10 min)
  • Functions that return other functions (10 min)
  • Example: building an object validator (25 min)

Building Functions for Fun and Profit

  • Function composition (15 min)
  • Partial application (15 min)
  • Currying (15 min)

Recursion(-sion -sion -sion)

  • Functions that call themselves (15 min)
  • Functions that call functions that call back (15 min)
  • Recursion, Iteration, and Stack Overflows (15 min)

Purity and Immutability

  • Pure functions (15 min)
  • Referential transparency (15 min)
  • Immutability (15 min)

Flow-Based Programming

  • You know this (it's Gulp!) (5 min)
  • Chaining (20 min)
  • Pipelining (20 min)

Classless Programming

  • Wait, I thought we just got classes in ES 2015! (5 min)
  • Data orientation (20 min)
  • Mixins (20 min)

Bonus Round, 1 of 2: ClojureScript

  • What is ClojureScript and why do I care about it? (10 min)
  • Immutability by default (15 min)
  • Programming without state (20 min)

Bonus Round, 2 of 2: ClojureScript

  • Tooling (20 min)
  • Debugging and workflow (20 min)
  • Additional resources (5 min)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment