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
56
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
13
PLT-14 IO Monad
kanaya
0
21
SCA-07 Art and Entertainment
kanaya
0
82
PLT-A3 Maybe Monad
kanaya
0
30
PLT-A2 Closure
kanaya
0
30
PLT-A1 Programming Principles
kanaya
0
25
IUM-03-Short Series of Functions
kanaya
0
130
PLT-02 How to Count Words
kanaya
0
85
IMU-00 Pi
kanaya
0
400
Other Decks in Education
See All in Education
沖ハック~のみぞうさんとハッキングチャレンジ☆~
nomizone
1
480
生成AI活用セミナー/GAI-workshop
gnutar
0
150
[FUN Open Campus 2025] 何でもセンシングしていいですか?
pman0214
0
270
Présentation_2nde_2025.pdf
bernhardsvt
0
320
外国籍エンジニアの挑戦・新卒半年後、気づきと成長の物語
hypebeans
0
230
Avoin jakaminen ja Creative Commons -lisenssit
matleenalaakso
0
2k
Google Gemini (Gem) の育成方法
mickey_kubo
2
360
[Segah 2025] Gamified Interventions for Composting Behavior in the Workplace
ezefranca
0
220
ThingLink
matleenalaakso
28
4.2k
バケットポリシーの記述を誤りマネコンからS3バケットを操作できなくなりそうになった話
amarelo_n24
1
130
Microsoft Office 365
matleenalaakso
0
2k
RSJ2025 ランチョンセミナー 一歩ずつ世界へ:学生・若手研究者のための等身大の国際化の始め方
t_inamura
0
330
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
4.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Side Projects
sachag
455
43k
The World Runs on Bad Software
bkeepers
PRO
72
12k
It's Worth the Effort
3n
187
28k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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ʹै͏ҙͷܕ