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
Catch Up: Go Style Guide Update
andpad
0
200
どの様にAIエージェントと 協業すべきだったのか?
takefumiyoshii
2
620
dynamic!
moro
9
6.8k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
1
490
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
630
CSC509 Lecture 06
javiergs
PRO
0
250
Six and a half ridiculous things to do with Quarkus
hollycummins
0
120
私はどうやって技術力を上げたのか
yusukebe
43
17k
Back to the Future: Let me tell you about the ACP protocol
terhechte
0
130
CSC305 Lecture 06
javiergs
PRO
0
210
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
Model Pollution
hschwentner
1
190
Featured
See All Featured
A Tale of Four Properties
chriscoyier
160
23k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Why Our Code Smells
bkeepers
PRO
339
57k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Facilitating Awesome Meetings
lara
56
6.6k
The Language of Interfaces
destraynor
162
25k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Embracing the Ebb and Flow
colly
88
4.8k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
The Straight Up "How To Draw Better" Workshop
denniskardys
237
140k
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