Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Functors
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sebastian Bruckner
June 21, 2017
Programming
32
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Functors
Sebastian Bruckner
June 21, 2017
Other Decks in Programming
See All in Programming
ActionController meets Protocol Buffers
sorah
0
520
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.5k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
Jetpack Compose Mechanisms
skydoves
3
820
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Domain-Driven Transformation
hschwentner
2
2.3k
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
270
APNsからLive Activityを開始する話
yumnumm
0
170
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
540
すこし踏み込む CancellationToken
htkym
2
1.7k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
210k
Typedesign – Prime Four
hannesfritz
42
3.2k
Leo the Paperboy
mayatellez
10
2.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
Producing Creativity
orderedlist
PRO
348
41k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Practical Orchestrator
shlominoach
192
12k
Transcript
Functors
Monoids
trait Monoid[A] { def empty: A def combine(one: A, another:
A): A }
Addition: empty: 0 combine: a + b Multiplication: empty: 1
combine: a * b List: empty: Nil combine: a ++ b
associativity: (x |+| y) |+| z = x |+| (y
|+| z) left identity: Monoid[A].empty |+| x = x right identity: x |+| Monoid[A].empty = x
Functors
// Option Some(2).map(_ * 3) === Some(6) None.map(_ * 3)
=== None
// List List(1, 2).map(_ * 3) === List(3, 6)
❓
Functors
trait Functor[F[_]] { def map[A, B](fa: F[A])(f: A => B):
F[B] }
identity: (x map identity) === x composition: (x map (v
=> g(f(v))) === (x map f map g)
Functors
-> -> ->