Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Purely Functional Data Structures chap.10.1
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shig.Takei
November 03, 2012
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Purely Functional Data Structures chap.10.1
Shig.Takei
November 03, 2012
More Decks by Shig.Takei
See All by Shig.Takei
How Ethereum Works (備忘録)
shtaag
0
59
Other Decks in Programming
See All in Programming
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.3k
ChromeでローカルLLM
ryu1013
0
180
パスワード再設定メールのURLについて知っておこう
uyuki234
0
200
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
1
280
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
310
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.1k
AmebaブログはKMPから卒業します
kmars0605
0
310
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
140
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7.1k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
130
JIS keyboard support in Omarchy
lef237
0
170
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.5k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Darren the Foodie - Storyboard
khoart
PRO
4
4.1k
Become a Pro
speakerdeck
PRO
31
6.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.4k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
340
Code Reviewing Like a Champion
maltzj
529
40k
Navigating Weather and Climate Data
rabernat
0
570
What's in a price? How to price your products and services
michaelherold
247
13k
Automating Front-end Workflow
addyosmani
1370
210k
The Language of Interfaces
destraynor
162
27k
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༵