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
32
PLT-X1 Division by Zero and Maybe
kanaya
June 08, 2025
Tweet
Share
More Decks by kanaya
See All by kanaya
PLT-A3 Maybe Monad
kanaya
0
12
PLT-A2 Closure
kanaya
0
11
PLT-A1 Programming Principles
kanaya
0
17
IUM-03-Short Series of Functions
kanaya
0
98
PLT-02 How to Count Words
kanaya
0
71
IMU-00 Pi
kanaya
0
370
The Art of Note Taking
kanaya
1
140
IMU-06 Complex
kanaya
0
86
IMU-05 Calculus
kanaya
0
130
Other Decks in Education
See All in Education
(キラキラ)人事教育担当のつらみ~教育担当として知っておくポイント~
masakiokuda
0
110
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
4
16k
推しのコミュニティはなんぼあってもいい / Let's join a lot of communities.
kaga
2
1.8k
モンテカルロ法(3) 発展的アルゴリズム / Simulation 04
kaityo256
PRO
7
1.4k
著作権と授業に関する出前講習会/dme-2025-05-01
gnutar
0
210
2025年度春学期 統計学 第12回 分布の平均を推測する ー 区間推定 (2025. 6. 26)
akiraasano
PRO
0
140
Sponsor the Conference | VizChitra 2025
vizchitra
0
570
技術文章を書くための執筆技術と実践法(パラグラフライティング)
hisashiishihara
19
6.6k
ThingLink
matleenalaakso
28
4.1k
Alumnote inc. Company Deck
yukinumata
0
680
2025年度春学期 統計学 第4回 データを「分布」で見る (2025. 5. 1)
akiraasano
PRO
0
150
AI for Learning
fonylew
0
160
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Being A Developer After 40
akosma
90
590k
Producing Creativity
orderedlist
PRO
346
40k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Visualization
eitanlees
146
16k
Gamification - CAS2011
davidbonilla
81
5.4k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
Navigating Team Friction
lara
187
15k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Writing Fast Ruby
sferik
628
62k
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ʹै͏ҙͷܕ