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
Purely Functional Data Structures chap.10.1
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Shig.Takei
November 03, 2012
Programming
0
190
Purely Functional Data Structures chap.10.1
Shig.Takei
November 03, 2012
Tweet
Share
More Decks by Shig.Takei
See All by Shig.Takei
How Ethereum Works (備忘録)
shtaag
0
48
Other Decks in Programming
See All in Programming
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
130
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
200
Nuxt Server Components
wattanx
0
210
PHPで TLSのプロトコルを実装してみる
higaki_program
0
580
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
3.3k
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
110
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
180
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
680
AI活用のコスパを最大化する方法
ochtum
0
360
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
250
OTP を自動で入力する裏技
megabitsenmzq
0
130
安いハードウェアでVulkan
fadis
1
840
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Practical Orchestrator
shlominoach
191
11k
WCS-LA-2024
lcolladotor
0
500
Code Reviewing Like a Champion
maltzj
528
40k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
340
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
91
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
420
Transcript
Purely Functional Data Structures chap.10.1 Structural Decomposition @shtaag 201211݄3༵
Data-Structural Bootstrappingͷ 201211݄3༵
ͱΓ͋͑ͣ͜Μͳͷ ʢStructural Decompositionͷྫʣ data Seq a = NIL | CONS’
a (Seq (a , a)) 201211݄3༵
ͱΓ͋͑ͣ͜Μͳͷ ʢStructural Decompositionͷྫʣ data Seq a = NIL | CONS’
a (Seq (a , a)) ܕaͷSeq͕ͩͬͨͣ ܕ(a,a)ʹมΘͬͯΔʂ 201211݄3༵
CONS’ a (Seq (a, a)) CONS’ (a, a) (Seq ((a,
a), (a, a)) CONS’ ((a, a), (a, a)) (Seq (((a, a), (a, a)), ((a, a), (a, a))) CONS’ (((a, a), (a, a)), ((a, a), (a, a))) (Seq ((((a, a), (a, a)), ((a, a), (a, a))), (((a, a), (a, a)), ((a, a), (a, a)))) Polymorphic Recursion 201211݄3༵
ҎԼɺ༻ޠ 201211݄3༵
BootStrapping bootstrapping a complete solution from an incomplete solution 201211݄3༵
structural decomposition incompleteͳσʔλߏ͔Β completeͳͷΛbootstrap structural abstraction inefficientͳσʔλߏ͔Β efficientͳߏΛbootstrap 201211݄3༵
uniform recursion data List a = NIL | CONS a
(List a) non-uniform recursion data Seq a = NIL | CONS’ a (Seq (a , a)) 201211݄3༵
Կ͕خ͍͠ʁ ܕͰߏΛറΔ͜ͱͰΞϧΰϦζϜ͕͔Γ͘͢ ͳΔ ઌఔͷseqϊʔυཁૉΛ2ͭ࣋ͭ͜ͱΛอূ ͍ͯ͠Δ sizeS (CONS’ (x, ps)) =
1 + 2 * sizeS ps 201211݄3༵