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
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
170
Intent as Code
shoppingjaws
6
1k
Family mrubyの進捗
kishima
1
120
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
340
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
210
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.4k
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
Webの地図
yosuke_furukawa
PRO
6
4.6k
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
130
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
240
スマート反転とウェブアクセシビリティ
camiha
0
210
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.3k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
Un-Boring Meetings
codingconduct
0
420
Balancing Empowerment & Direction
lara
6
1.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.9k
Paper Plane
katiecoart
PRO
4
53k
Utilizing Notion as your number one productivity tool
mfonobong
4
590
Deep Space Network (abreviated)
tonyrice
0
310
Making Projects Easy
brettharned
120
6.8k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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
-> -> ->