Functional Programmer's Starter Kit

Preview:

Citation preview

FPSKFunctional Programmer’s Starter Kit

FunctionalOO

implementation

Libraries & Frameworks

abstract thinkers & debates

Functional is the only way

implementation

Libraries & Frameworks

abstract thinkers & debates

implementation

Most of what’s online is like this

Immutable

Composition

Promises

Why Functional?

Procedural Past

immutable

Certainty

Structural Sharing

Immutable Structures

code

Work on the Model or API Layer

Less uncertainty within app

No side effects

Composition

The Imperative Way

code

We compose functions for parsing that becomes reusable

We compose functions for parsing that becomes reusable

`

We compose functions for parsing that becomes reusable

“The nature of promises is that they remain

immune to changing circumstances.”

-Frank Underwood

Syntactic Suger

Callback Hell

promises

Promises vs Callbacks

Callbacks are about manipulating control flow….

Promises vs Callbacks

Promises are wrappers that return values

Takeaways1. Use Immutable Data Structures to add certainty to

your app

2. Compose your app with small pure functions that do one thing

3. Take out your callbacks for promises

Garreth@garreth_dottin

Dottinwww.habitsanddesign.com/fpsk

Thanks to: Tenor Biel

Serena Jang John Paul