# Professor Frisby Introduces Composable Functional JavaScript

This course teaches the ubiquitous abstractions for modeling pure functional programs. Functional languages have adopted these algebraic constructs across the board as a way to compose applications in a principled way.

We can do the same in JavaScript. While the subject matter will move beyond the functional programming basics, no previous knowledge of functional programming is required. You'll start composing functionality before you know it.

Watch User Created Playlist (29)

#### Create linear data flow with container style types (Box)

5:04 javascript

We'll examine how to unnest function calls, capture assignment, and create a linear data flow with a type we call Box. This is our introduction to working with the various container-style types.

#### Principled type conversions with Natural Transformations

4:03 javascript

We learn what a natural transformation is and see the laws it must obey. We will see how a natural transformation must uphold the law of nt(x).map(f) == nt(x.map(f)).

#### Apply Natural Transformations in everyday work

4:24 javascript

We see three varied examples of where natural transformations come in handy.

#### Isomorphisms and round trip data transformations

4:30 javascript

We formally define isomorphisms, make a few, then use them to accomplish normal programming tasks

#### Build a data flow for a real world app

6:12 javascript

We form a plan to find the common ground between two artists from the spotify api. Then we sketch out a data flow to ensure we have what we need, when we need it.

#### Retrieve and use data from an api with pure functional constructs

7:07 javascript

We flesh out the Spotify api with pure functional constructs to retrieve two sets of related artists.

#### Find the intersection of sets with Semigroups

5:57 javascript

We use semigroups to find the intersection of sets, then expand that to work on as many artists as we'd like. Finally, we use foldable to show a pair of intersection and sum to shed more light on the final result set.

#### Refactor imperative code to a single composed expression using Box

4:44 javascript

We refactor 3 functions, taking line by line imperative code to a single composed expression using Box container type.

#### Enforce a null check with composable code branching using Either

5:58 javascript

We define the Either type and see how it works. Then try it out to enforce a null check and branch our code.

#### Use chain for composable error handling with nested Eithers

3:57 javascript

We refactor a function that uses try/catch to a single composed expression using Either. We then introduce the chain function to deal with nested Eithers resulting from two try/catch calls.

#### A collection of Either examples compared to imperative code

2:05 javascript

A tour of simple functions rewritten as composed expressions using Either set to 8 byte music and colorful flying blocks

#### Create types with Semigroups

5:52 javascript

An introduction to concatting items via the formal Semi-group interface. Semi-groups are simply a type with a concat method that are associative. We define three semigroup instances and see them in action.

#### Semigroup examples

2:01 javascript

A few examples of Semigroup definitions

#### Ensure failsafe combination using monoids

4:33 javascript

In this video we define monoids and promote our semigroups

#### A curated collection of Monoids and their uses

1:12 javascript

A gallery of monoid definitions and some use cases

#### Unbox types with foldMap

2:50 javascript

We get a clearer definition of what it means to fold a type, then we look at the foldMap function

#### Delay Evaluation with LazyBox

1:26 javascript

We rewrite the Box example using lazy evaulation

#### Capture Side Effects in a Task

2:58 javascript

We examine the data structure Task, see some constructors, familiar methods, and finally how it captures side effects through laziness.

#### Use Task for Asynchronous Actions

3:46 javascript

We refactor a standard node callback style workflow into a composed task-based workflow.

#### You've been using Functors

3:19 javascript

We learn the formal definition of a functor and look at the laws they obey.

#### Lift into a Pointed Functor with of

1:21 javascript

We examine the `of` function we've seen on a few types and discover it's the Pointed interface.

5:43 javascript

We discover, we've been using monads! We look a little further into the `chain` method and see laws that ensure the monadic structure works correctly.

#### Build curried functions

4:50 javascript

We see what it means to curry a function, then walk through several examples of curried functions and their use cases.

#### Applicative Functors for multiple arguments

4:42 javascript

Working our way backwards from solution to problem, we define an applicative functor, then use it to apply a function of multiple arguments.

#### Apply multiple functors as arguments to a function (Applicatives)

2:18 javascript

We find a couple of DOM nodes that may or may not exist and run a calculation on the page height using applicatives.

#### List comprehensions with Applicative Functors

2:14 javascript

We annihilate the need for the ol' nested `for` loop using Applicatives.

#### Write applicatives for concurrent actions

1:37 javascript

We start with two sequential finds using monads, then rewrite our code to achieve two concurrent finds.

#### Leapfrogging types with Traversable

2:52 javascript

We use the traversable instance on List to reimplement Promise.all() type functionality.

#### Maintaining structure whilst asyncing

2:35 javascript

We take our Promise.all() analogy further by using traversable on a Map(). Then we use two traversals in the same workflow.

HEY, QUICK QUESTION!