Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Functional JavaScript
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Medson Oliveira
December 14, 2018
Programming
85
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Functional JavaScript
Introduction about what's and how to program functional javascript
Medson Oliveira
December 14, 2018
More Decks by Medson Oliveira
See All by Medson Oliveira
React_Native_and_ReasonML.pdf
medson10
0
60
Other Decks in Programming
See All in Programming
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
290
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
540
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
190
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
880
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
Practical Orchestrator
shlominoach
192
12k
Test your architecture with Archunit
thirion
2
2.4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Crafting Experiences
bethany
1
380
Paper Plane
katiecoart
PRO
5
54k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Building an army of robots
kneath
307
47k
Transcript
FUNCTIONAL PROGRAMMING IN JAVASCRIPT
MEDSON OLIVEIRA Full Stack Developer at ASTROCODERS github.com/medson10 @o_medson @MedsonOliveira
[email protected]
What's functional programming?
None
None
None
What makes a language have the possibility of being functional?
• Immutability • First class functions • Recursion • Expression oriented programming
Immutability? a value can be defined just one time
First class functions • Lambda expressions • Lexical closures •
High order functions
Why Recursion? "Is not just much more elegant, but also
the only way to iterate without invoking side-effects"
Expression oriented programming? Everything returns a value
How JavaScript can be functional?
JavaScript is not a pure functional language!!!!!1 • Doesn't have
immutability • JavaScript is object based, everything is an object • Type system supeeeerrrrr dynamic
So what's the point?
Functional is not just a kind of programming language but
also a way to program and organize your code
None
So can I program in a functional way in all
the others languages?
None
What's needed for code in a functional way? • First
class functions • Immutability • Recursion
And how we can start it on JavaScript?
None
None
None
What would be Functional JavaScript?
CONST now, CONST tomorrow, CONST forever
Pure functions
Side Effects
Pipe instead of Chain
But why? Let's think in a case a little more
complex
And about performance? What is the pipe behind?
Let's curry some functions
And how ramda helps us with all this? https://ramdajs.com/docs/#
HERE I AM!!!!!!!!
But why not code in a functional language and compile
it to JavaScript?
None
References https://github.com/stoeffel/awesome-fp-js https://lukajcb.github.io/blog/functional/2016/07/31/what-makes-a-language-functio nal.html https://hackernoon.com/two-years-of-functional-programming-in-javascript-lessons-l earned-1851667c726 https://github.com/hemanth/functional-programming-jargon https://hackernoon.com/currying-in-js-d9ddc64f162e