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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
Fragmented Architectures
denyspoltorak
0
150
CSC307 Lecture 05
javiergs
PRO
0
500
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Fluid Templating in TYPO3 14
s2b
0
130
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
350
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
AI時代の認知負荷との向き合い方
optfit
0
150
Basic Architectures
denyspoltorak
0
660
Featured
See All Featured
Visualization
eitanlees
150
17k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Prompt Engineering for Job Search
mfonobong
0
160
Designing for Timeless Needs
cassininazir
0
130
Navigating Weather and Climate Data
rabernat
0
100
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
A designer walks into a library…
pauljervisheath
210
24k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
110
KATA
mclloyd
PRO
34
15k
Writing Fast Ruby
sferik
630
62k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
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