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
Javascript Funcional - Uma breve introdução @Ig...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
hack.river
July 07, 2016
Programming
0
42
Javascript Funcional - Uma breve introdução @Igor Soares
hack.river
July 07, 2016
Tweet
Share
More Decks by hack.river
See All by hack.river
hack.river #intro
hackriver
0
720
ElasticSearch - Tornando suas buscas textuais mais poderosas @Thiago Gonzaga
hackriver
0
40
Other Decks in Programming
See All in Programming
CSC307 Lecture 08
javiergs
PRO
0
670
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
100
Data-Centric Kaggle
isax1015
2
770
SourceGeneratorのススメ
htkym
0
200
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
960
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
CSC307 Lecture 06
javiergs
PRO
0
680
Featured
See All Featured
Side Projects
sachag
455
43k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Ethics towards AI in product and experience design
skipperchong
2
190
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
4 Signs Your Business is Dying
shpigford
187
22k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
A Soul's Torment
seathinner
5
2.3k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
64
Code Review Best Practice
trishagee
74
20k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Transcript
Javascript Funcional uma breve Introdução
github.com/ripfoghorn twitter.com/ripfoghorn_ 20 anos desenvolvedor back-end por 3 anos entusiasta
de robôs gigantes
Programação Funcional?
Paradigma de programação que trata a computação como uma avaliação
de funções matemáticas e que evita estados ou dados mutáveis.
?
Paradigma
Funções puras Imutabilidade de estado Composição de funções Redução de
código
Matemática
f(x) = 2x + 1
f(3) = 2(3) + 1 = 7
g(y) = y + 5
f(g(y)) = f(y + 5) = 2(y + 5) +
1 = 2y + 11
Programação Funcional == Matemática
Funções
function f(x) { return 2*x + 1; }
function g(y) { return y + 5; }
console.log(f(g(3)));
17
Funções de ordem superior e funções de primeira classe
var composta = function(a) { return f(g(a)); }
composta(3) //=> 17 composta(4) //=> 19
Composição
var add1= function(x){ return x + 1; }
var quadrado = function(x){ return x * x; }
var f = function(x) { return add1(quadrado(x)); }
console.log(f(7)) ??
50
Funções Puras Imutabilidade de estado
function pura(a, b) { return a + b; }
var a = 1; function impura(b) { return a +
b; }
a = new Date().getDay();
Estado
f(x) = 2x f(2) = 4
Arrays!
Curry!
OK, mas por que Javascript mesmo?
Node NPM Full-stack
ES6 Arrow Functions Map Reduce Filter ...
IIFE’s
(function() {...})(); (()=> {...})();
Underscore Lodash Ramda Immutable Fn Function
Fun();
Obrigado!