Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Functors
Search
Sebastian Bruckner
June 21, 2017
Programming
0
26
Functors
Sebastian Bruckner
June 21, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.3k
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
150
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
110
クラウドに依存しないS3を使った開発術
simesaba80
0
120
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
410
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
120
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
450
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
160
Python札幌 LT資料
t3tra
6
1k
Developing static sites with Ruby
okuramasafumi
0
320
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
240
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
160
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
88
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Code Reviewing Like a Champion
maltzj
527
40k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
140
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
91k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Technical Leadership for Architectural Decision Making
baasie
0
180
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
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
-> -> ->