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
Architectural Extensions
denyspoltorak
0
280
ぼくの開発環境2026
yuzneri
0
160
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
SourceGeneratorのススメ
htkym
0
190
Grafana:建立系統全知視角的捷徑
blueswen
0
330
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
ThorVG Viewer In VS Code
nors
0
770
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.1k
Featured
See All Featured
New Earth Scene 8
popppiees
1
1.5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
72
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
HDC tutorial
michielstock
1
370
Documentation Writing (for coders)
carmenintech
77
5.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Visualization
eitanlees
150
17k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Abbi's Birthday
coloredviolet
1
4.7k
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