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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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 07
javiergs
PRO
0
550
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
Architectural Extensions
denyspoltorak
0
290
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
dchart: charts from deck markup
ajstarks
3
990
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
CSC307 Lecture 08
javiergs
PRO
0
670
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
AtCoder Conference 2025
shindannin
0
1.1k
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
700
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Between Models and Reality
mayunak
1
190
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Building the Perfect Custom Keyboard
takai
2
680
Into the Great Unknown - MozCon
thekraken
40
2.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
320
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
190
Navigating Weather and Climate Data
rabernat
0
110
Optimising Largest Contentful Paint
csswizardry
37
3.6k
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!