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
Functors
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sebastian Bruckner
June 21, 2017
Programming
0
26
Functors
Sebastian Bruckner
June 21, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Basic Architectures
denyspoltorak
0
660
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
CSC307 Lecture 03
javiergs
PRO
1
490
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
SourceGeneratorのススメ
htkym
0
190
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.8k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
49k
Code Reviewing Like a Champion
maltzj
527
40k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Crafting Experiences
bethany
1
46
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The agentic SEO stack - context over prompts
schlessera
0
630
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
91
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
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
-> -> ->