Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Purely Functional Data Structures chap.10.1
Search
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
44
Other Decks in Programming
See All in Programming
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
150
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
360
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
130
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
1.7k
gunshi
kazupon
1
110
Cell-Based Architecture
larchanjo
0
140
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
3
1.1k
Cap'n Webについて
yusukebe
0
150
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
110
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.3k
tparseでgo testの出力を見やすくする
utgwkk
2
280
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
150
Designing Experiences People Love
moore
143
24k
Deep Space Network (abreviated)
tonyrice
0
21
Done Done
chrislema
186
16k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
190
Balancing Empowerment & Direction
lara
5
820
Building Applications with DynamoDB
mza
96
6.8k
Statistics for Hackers
jakevdp
799
230k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
69
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
68
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
16
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༵