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
PLT-X1 Division by Zero and Maybe
Search
kanaya
June 08, 2025
Education
1
42
PLT-X1 Division by Zero and Maybe
kanaya
June 08, 2025
Tweet
Share
More Decks by kanaya
See All by kanaya
PLT-A4 IO Monad
kanaya
0
12
PLT-14 IO Monad
kanaya
0
20
SCA-07 Art and Entertainment
kanaya
0
79
PLT-A3 Maybe Monad
kanaya
0
25
PLT-A2 Closure
kanaya
0
24
PLT-A1 Programming Principles
kanaya
0
23
IUM-03-Short Series of Functions
kanaya
0
120
PLT-02 How to Count Words
kanaya
0
75
IMU-00 Pi
kanaya
0
390
Other Decks in Education
See All in Education
質のよいアウトプットをできるようになるために~「読む・聞く、まとめる、言葉にする」を読んで~
amarelo_n24
0
180
ANS-C01_2回不合格から合格までの道程
amarelo_n24
1
290
マネジメント「される側」 こそ覚悟を決めろ
nao_randd
10
5.4k
自己紹介 / who-am-i
yasulab
PRO
3
5.3k
Common STIs in London: Symptoms, Risks & Prevention
medicaldental
0
140
サンキッズゾーン 春日井駅前 ご案内
sanyohomes
0
690
理想の英語力に一直線!最高効率な英語学習のすゝめ
logica0419
6
350
Info Session MSc Computer Science & MSc Applied Informatics
signer
PRO
0
200
20250611_なんでもCopilot1年続いたぞ~
ponponmikankan
0
140
Padlet opetuksessa
matleenalaakso
4
14k
OpenSourceSummitJapanを運営してみた話
kujiraitakahiro
0
760
モンテカルロ法(3) 発展的アルゴリズム / Simulation 04
kaityo256
PRO
7
1.4k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
YesSQL, Process and Tooling at Scale
rocio
173
14k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Site-Speed That Sticks
csswizardry
10
770
It's Worth the Effort
3n
185
28k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
KATA
mclloyd
32
14k
Transcript
pineapple.cc ۚ୩Ұ࿕ʢ࡚େֶใσʔλՊֶ෦ʣ θϩআࢉͱ.BZCF ϓϩάϥϛϯάݴޠ
pineapple.cc 1 0 = ?
None
pineapple.cc θϩআࢉͷରԠ w ϓϩάϥϜΛҟৗऴྃͤ͞Δʢྫ֎Λൃੜͤ͞Δʣ w ༗ཧશମɼ࣮શମΑΓʮ͍ʯू߹Λ͏ w *O fi OJUZͱ͍͏ʹ͢Δ
w /B/ /PUB/VNCFS ͱ͍͏ʹ͢Δ w ൚༻తͳΈΛ͏
pineapple.cc 1 0 = ?
pineapple.cc a ∈ ℤ b ∈ ℚ a = user_input
b = 1 a
pineapple.cc b⋆ ∈ {∅} ∪ ℚ
pineapple.cc a ∈ ℤ b⋆ ∈ {∅} ∪ ℚ a
= user_input b⋆ = { 1 a where a ≠ 0 ∅ otherwise
pineapple.cc M 𝔸 ≜ {∅} ∪ 𝔸
pineapple.cc a ∈ ℤ b⋆ ∈ M ℚ a =
user_input b⋆ = { 1 a where a ≠ 0 ∅ otherwise
pineapple.cc b⋆, c⋆ ∈ M ℚ b⋆ + c⋆ =
{ b + c where b⋆ ≠ ∅ ∧ c⋆ ≠ ∅ ∅ otherwise
pineapple.cc b⋆, c⋆ ∈ M ℚ b⋆ + c⋆ =
{ b + c where b⋆ ≠ ∅ ∧ c⋆ ≠ ∅ ∅ otherwise M ℚ ℚ
pineapple.cc x ∈ 𝔸 Jx ∈ M 𝔸 Jx =
x b⋆, c⋆ ∈ M ℚ b⋆ + c⋆ = { J(b + c) where b⋆ ≠ ∅ ∧ c⋆ ≠ ∅ ∅ otherwise ܕίϯετϥΫλ ίϯετϥΫλ
pineapple.cc x0 = 0 x1 = 1 x2 = 2
x′  = [x0 , x1 , x2]
pineapple.cc xi ∈ ℝ x′  ∈ [ℝ]
pineapple.cc xi ∈ ℝ x′  ∈ [ℝ] = L
ℝ = [] ℝ ܕίϯετϥΫλ ܕίϯετϥΫλ
pineapple.cc x′  = [x0 , x1 , x2] y′
 = [y0 , y1 , y2 , y3] z′  = x′  #y′  = [x0 , x1 , x2 , y0 , y1 , y2 , y3] ίϯετϥΫλ
pineapple.cc x′  = [x0 , x1 , x2] y′
 = [ ] z′  = x′  #y′  = [x0 , x1 , x2] ίϯετϥΫλ
pineapple.cc Maybe/Optional ྻ ҰൠԽ جຊܕ A A A ܕ {∅}∪A
[A] *1 ܕίϯετϥΫλ M A Maybe A L A List A, [] A, [A] F A F A ίϯετϥΫλ J x, ∅ Just x, Nothing [x], [ ] [x], [] V x V x *1 Functor Lawʹै͏ҙͷܕ