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
45
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
80
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
77
IMU-00 Pi
kanaya
0
390
Other Decks in Education
See All in Education
みんなのコードD&I推進レポート2025 テクノロジー分野のジェンダーギャップとその取り組みについて
codeforeveryone
0
180
アントレプレナーシップ教育 ~ 自分で自分の幸せを決めるために ~
yoshizaki
0
160
Présentation_1ère_Spé_2025.pdf
bernhardsvt
0
110
Портфолио - Шынар Ауелбекова
shynar
0
100
データで見る赤ちゃんの成長
syuchimu
0
250
OJTに夢を見すぎていませんか? ロールプレイ研修の試行錯誤/tryanderror-in-roleplaying-training
takipone
1
220
AWSと共に英語を学ぼう
amarelo_n24
0
150
Case Studies and Course Review - Lecture 12 - Information Visualisation (4019538FNR)
signer
PRO
1
2.1k
2025年度春学期 統計学 第10回 分布の推測とは ー 標本調査,度数分布と確率分布 (2025. 6. 12)
akiraasano
PRO
0
220
RSJ2025 ランチョンセミナー 一歩ずつ世界へ:学生・若手研究者のための等身大の国際化の始め方
t_inamura
0
170
新卒研修に仕掛ける 学びのサイクル / Implementing Learning Cycles in New Graduate Training
takashi_toyosaki
1
220
今までのやり方でやってみよう!?~今までのやり方でやってみよう!?~
kanamitsu
0
140
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Gamification - CAS2011
davidbonilla
81
5.4k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Optimizing for Happiness
mojombo
379
70k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Statistics for Hackers
jakevdp
799
220k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Designing for Performance
lara
610
69k
How to Ace a Technical Interview
jacobian
279
23k
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ʹै͏ҙͷܕ