Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Functional Programming
Search
Howard, Chang
August 23, 2016
Programming
0
48
Functional Programming
Functional Programming concept (in JavaScript). Internal share in RingCentral.
Howard, Chang
August 23, 2016
Tweet
Share
Other Decks in Programming
See All in Programming
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
2
510
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
1.7k
孤独のCTOグルメという やや奇抜な企画をやった目的と効果
shoheimitani
3
1k
[スクリプト] Swiftの型推論を学ぼう
omochi
0
110
Kotlinを用いたDSL的な設計手法と使用上の注意
kohii00
3
530
phpunit/php-code-coverageって何をしてるんだ #phperkaigi
o0h
PRO
2
220
BuefyのMaintainerを引き継いだ件
kikuomax
0
510
ファイル先頭の use の意味、説明できますか? 〜PHP の namespace と autoloading の関係を正しく理解しよう〜 / namespace and autoloading in php
okashoi
2
470
品質が高いコードって何?Rev2.1
ickx
1
490
TCAの Shared Stateって どういう仕組みになってんの?
yimajo
0
330
DDDはなぜ難しいのか / 良いコードの定義と設計能力の壁
pospome
24
7.3k
OpenTelemetry のサービスという概念について
azukiazusa1
1
390
Featured
See All Featured
What the flash - Photography Introduction
edds
64
11k
Building an army of robots
kneath
300
41k
A Philosophy of Restraint
colly
195
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
1.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
A better future with KSS
kneath
230
16k
Designing with Data
zakiwarfel
94
4.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
350
18k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
A designer walks into a library…
pauljervisheath
199
23k
The Pragmatic Product Professional
lauravandoore
24
5.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
950
Transcript
Functional Programming
Outline • Why • What • How • Real world
use cases
Outline • Why (1 mins) • What (20 mins) •
How (10 mins) • Real world use cases (? mins)
Why • When I was young.
None
None
FP
None
What • Pure function • Function composition • Curry •
Partial application • Monads & Functor • Immutability
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
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.
Function composition • Higher-order function • Decorator pattern • Factory
pattern • Strategy pattern
Curry
Curry
Partial application • Dependency injection • bind
Monads & Functor • Why: Chaining continuation • What: Container
• How:
Monads & Functor • Example: Options
Monads & Functor • Example: Array
Monads & Functor • Example: Promise
Monad & Functor • "Once you understand monads, you start
seeing them everywhere” - Eric Kidd
Monad & Functor
Monad & Functor
None
Monad & Functor • http://chrisdone.com/posts/monads-are-burritos
Immutability • Value, not place • “Can you give me
the log for this error?”
How • Function as things • Composition everything • Types,
not Class
How • Totality • Static type for modeling • Parameterise
all the things
Real World • React / Redux • Elm • Haskell
• Lisp
Real World • React / Redux • Elm • Haskell
• Lisp
React / Redux • React • Redux
Elm
Haskell
Reference