Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Functional Programming

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Functional Programming

Functional Programming concept (in JavaScript). Internal share in RingCentral.

Avatar for Howard, Chang

Howard, Chang

August 23, 2016
Tweet

Other Decks in Programming

Transcript

  1. Outline • Why (1 mins) • What (20 mins) •

    How (10 mins) • Real world use cases (? mins)
  2. FP

  3. What • Pure function • Function composition • Curry •

    Partial application • Monads & Functor • Immutability
  4. Pure function • The function always evaluates the same result

    value given the same argument value(s). • Evaluation of the result does not cause any semantically observable side effect or output
  5. Pure function • The function always evaluates the same result

    value given the same argument value(s). • Evaluation of the result does not cause any semantically observable side effect or output. • Function must return something.
  6. Monad & Functor • "Once you understand monads, you start

    seeing them everywhere” - Eric Kidd
  7. Elm