Lets start from short history of JS:

Reference transparency

Function as first class citizen

You have done Functional Programming when you did any of this:

{{js.caption}}

{{sql.caption}}

{{xml.caption}}

{{logo.caption}}

Imperative style vs Functional

JS 101:

Task #1: Fluent API

{{task1.caption}}

Fluent API

Task #1:Response

Task #fluid-sandwich: makeFluidSandwich()

so that its easy to see its fluent

Task #fluent-sandwich:Response

vs OOP

Monads for dynamic type safety

Monads for dynamic type safety, cd.

Task #2: Generators

{{task2.caption}}

Task #2:Response

Make function adder:

Currying()

Haskell Curry

Task #3:Response

Task #4:

Use map function to transform data-structure

Task #4:Response

Decorator flip:

Decorator flip:

Task #flip-fromTo: make returnTrip()

Task #flip-fromTo:Response

Example unary combinator: curry

Task #3-using-curry

From task #3: Extract function add(), and use currying to make (better) adder()

Task #3-using-curry:Response

Task #compose-map:

Return firstTitle() using map

https://gist.github.com/syzer/e7a69e8a31205766a7c0

Task #compose-map:Response

Function composition

Task #compose-reduce:

Return firstTitle() using reduce

Task #compose-reduce:Response

Task #compose-compose:

Return firstTitle() using _.compose, _.curry, _.first, _.pluck

Task #compose-compose:Response

Task #articles-is-author:Response

Make function isAuthor() using: _.compose, _.pluck, _.curry

Task #articles-is-author:Response

vs AOP

Decorator before:

vs AOP

Decorator before:

Let's use before decorator:

Common decorators usages

Task #after-decorator

Make after() decorator, that runs a function after other function

Task #after-decorator: Response

Decorate function double() with login and make doubleWithLog()

Task #after-decorator-with-logging

Task #after-decorator-with-logging: Response

Task #curry-task-summary

https://gist.github.com/syzer/0abe91822a0b8e1ec750

Expected

Helper: fetchData()

Task #curry-task-summary: Response