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
Monads na prática - QConSP 2014
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Breno Ferreira
April 09, 2014
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Monads na prática - QConSP 2014
Breno Ferreira
April 09, 2014
More Decks by Breno Ferreira
See All by Breno Ferreira
TDC Globo Sistemas Distribuídos
brenoferreira
1
100
Trabalho Remoto TDC Globo 2020
brenoferreira
1
120
Immutable Da
brenoferreira
0
98
Remote Work
brenoferreira
0
100
Fun with Types
brenoferreira
0
240
RxJava
brenoferreira
1
410
.NET Além do Mundo Microsoft
brenoferreira
0
100
TDC2013 - Programação assíncrona com Javascript
brenoferreira
1
580
TDD com Javascript
brenoferreira
1
520
Other Decks in Programming
See All in Programming
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
140
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
330
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
130
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.7k
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
100
AI時代のUIはどこへ行く?その2!
yusukebe
21
7.1k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
500
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
110
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.2k
Vite+ Unified Toolchain for the Web
naokihaba
0
290
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
190
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Making Projects Easy
brettharned
120
6.7k
Utilizing Notion as your number one productivity tool
mfonobong
4
320
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
The Limits of Empathy - UXLibs8
cassininazir
1
360
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
The untapped power of vector embeddings
frankvandijk
2
1.8k
Transcript
MONADS NA PRÁTICA @breno_ferreira Breno Ferreira
PROGRAMAÇÃO FUNCIONAL É ASSUSTADOR Functors Monoids Catamorphism MONAD
PROGRAMAÇÃO FUNCIONAL É POUCO FAMILIAR Functors Monoids Catamorphism MONAD
PROGRAMAÇÃO FUNCIONAL É POUCO FAMILIAR Mappables Monoids Catamorphism MONAD
PROGRAMAÇÃO FUNCIONAL É POUCO FAMILIAR Mappables Monoids Aggregatables MONAD
PROGRAMAÇÃO FUNCIONAL É POUCO FAMILIAR Mappables Composables Aggregatables MONAD
PROGRAMAÇÃO FUNCIONAL É POUCO FAMILIAR Mappables Composables Aggregatables Chainable
ORIENTAÇÃO A OBJETO É ASSUSTADOR! Polimorfismo Herança Variancia interfaces SOLID
SRP, OCP, LSP, ISP, DIP IoC, DI, MVC, ORM, GoF, PoEAA…
ORIENTAÇÃO A OBJETO É ASSUSTADOR! Polimorfismo Herança Variancia interfaces SOLID
SRP, OCP, LSP, ISP, DIP IoC, DI, MVC, ORM, GoF, PoEAA…
MAS O QUE É UMA MONAD?
MAS O QUE É UMA MONAD? A monad is just
a monoid in the category of endofunctors. James Iry http://james-iry.blogspot.com.br/2009/05/brief-incomplete-and-mostly-wrong.html
DEFINIÇÃO DE UMA MONAD type Monad return :: a ->
m a (>>=) :: m a -> (a -> m b) -> m b
TRADUÇÃO interface Monad<A> static Create(value: A): Monad<A> flatMap(mapper: A ->
Monad<B>): Monad<B>
MAS PARA QUE AS MONADS SÃO ÚTEIS? • Nulls •
Exceptions • Assincronia • Reactive Programming • Mutable state • etc…
HTTPS://GITHUB.COM/BRENOFERREIRA/CSHARP.FUN
OBRIGADO! @breno_ferreira