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
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
97
Remote Work
brenoferreira
0
100
Fun with Types
brenoferreira
0
240
RxJava
brenoferreira
1
410
.NET Além do Mundo Microsoft
brenoferreira
0
99
TDC2013 - Programação assíncrona com Javascript
brenoferreira
1
570
TDD com Javascript
brenoferreira
1
520
Other Decks in Programming
See All in Programming
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.4k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1.1k
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
2k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
530
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
190
inferと仲良くなる10分間
ryokatsuse
1
360
CSC307 Lecture 17
javiergs
PRO
0
310
dRuby over BLE
makicamel
2
300
The NotImplementedError Problem in Ruby
koic
1
440
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.1k
JavaDoc 再入門
nagise
0
260
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
930
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Speed Design
sergeychernyshev
33
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Skip the Path - Find Your Career Trail
mkilby
1
140
WENDY [Excerpt]
tessaabrams
11
38k
The untapped power of vector embeddings
frankvandijk
2
1.7k
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