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
Ruby Parser progress report 2025
yui_knk
1
460
楽して成果を出すためのセルフリソース管理
clipnote
0
190
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
250
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
360
より安全で効率的な Go コードへ: Protocol Buffers Opaque API の導入
shwatanap
3
830
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
230
testingを眺める
matumoto
1
140
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
2.1k
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.9k
AI時代のUIはどこへ行く?
yusukebe
18
9.2k
AIでLINEスタンプを作ってみた
eycjur
1
230
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
780
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Documentation Writing (for coders)
carmenintech
74
5k
Code Reviewing Like a Champion
maltzj
525
40k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
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