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
Breno Ferreira
April 09, 2014
Programming
0
110
Monads na prática - QConSP 2014
Breno Ferreira
April 09, 2014
Tweet
Share
More Decks by Breno Ferreira
See All by Breno Ferreira
TDC Globo Sistemas Distribuídos
brenoferreira
1
69
Trabalho Remoto TDC Globo 2020
brenoferreira
1
83
Immutable Da
brenoferreira
0
61
Remote Work
brenoferreira
0
70
Fun with Types
brenoferreira
0
210
RxJava
brenoferreira
1
370
.NET Além do Mundo Microsoft
brenoferreira
0
72
TDC2013 - Programação assíncrona com Javascript
brenoferreira
1
530
TDD com Javascript
brenoferreira
1
480
Other Decks in Programming
See All in Programming
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
590
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
520
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
920
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
220
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
140
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
190
CSC305 Lecture 04
javiergs
PRO
0
250
Pythonスレッドとは結局何なのか? CPython実装から見るNoGIL時代の変化
curekoshimizu
4
1.3k
SpecKitでどこまでできる? コストはどれくらい?
leveragestech
0
520
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
150
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
690
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
RailsConf 2023
tenderlove
30
1.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Six Lessons from altMBA
skipperchong
28
4k
A designer walks into a library…
pauljervisheath
209
24k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Building an army of robots
kneath
306
46k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
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