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
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
Architectural Extensions
denyspoltorak
0
290
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
690
CSC307 Lecture 07
javiergs
PRO
0
550
Fluid Templating in TYPO3 14
s2b
0
130
AgentCoreとHuman in the Loop
har1101
5
240
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
Oxlintはいいぞ
yug1224
5
1.3k
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
2.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
A Soul's Torment
seathinner
5
2.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
53
Visualization
eitanlees
150
17k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
[SF Ruby Conf 2025] Rails X
palkan
1
750
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
The Limits of Empathy - UXLibs8
cassininazir
1
210
Fireside Chat
paigeccino
41
3.8k
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!