Task: Done
Information
We have now been on a ride through some of the interesting parts of functional programming. You have seen some code that doesn’t look much like the JavaScript we normally write. We have also seen that the same code has interesting properties, such as less focus on state and mutability. Hopefully you have learned something along the way.
To wrap up what we have seen today – basically, functional programming achieve reuse at a coarser-grained level than object-oriented programming, extracting common machinery with parameterized behavior. Most applications do things with lists of elements, so a functional approach is to build reuse mechanisms around the idea of lists plus contextualized, portable code.
Btw, want to learn more?
https://leanpub.com/javascript-allonge/read and http://shop.oreilly.com/product/0636920028857.do
// THE END!
Test results:
Output:
Tasks
- Part 0: Introduction to the workshop
- Part 1: A functions context
- Part 1: A functions arguments
- Part 1: Functions and prototypes
- Part 2: Applicative programming
- Part 2: Make new collections with map
- Part 2: Make new collections with filter
- Part 2: Make new collections with reduce
- Part 2: Using helper liberaries
- Part 2: Point-free style
- Part 2: Applicative functions with context
- Part 3: Function factories
- Part 3: Higher order functions
- Part 3: Functions with functions
- Part 3: Fluent interfaces
- Part 3: Function arity
- Part 4: Partial application
- Part 4: Create functions from functions
- Part 5: Currying
- Part 5: Composition
- Part 5: Pipelines
- Part 5: Case - Parse URL
- Part 6: Shared state
- Part 7: Working with collections
- Part 7: Done [Active]
Help
Available globals
_
: Lo-dash.jslog
: log-command that logs to view and console
Testing
describe
: new test suite (mocha)it
: new test (mocha)xit
: pending test (mocha)xdescribe
: pending scenario (mocha)before/after
: run code before or after all tests (mocha)beforeEach/afterEach
: run code before or after each tests (mocha)chai
: chai.js assertion library