Skip to Content
深入理解運算原理|從簡單的機器到無所不能的程式
book

深入理解運算原理|從簡單的機器到無所不能的程式

by Tom Stuart
November 2017
Beginner to intermediate
344 pages
7h 2m
Chinese
GoTop Information, Inc.
Content preview from 深入理解運算原理|從簡單的機器到無所不能的程式
四處皆通用
|
235
inc[S[K[inc]][I][zero]]
inc[K[inc][zero][I[zero]]] inc[inc[I[zero]]] inc[inc[zero]]
=> nil
果然,以名為
inc
zero
的符號呼叫轉換後的運算式,已經估算成
inc[inc[zero]]
,這
完全就是我們想要的。相同的轉譯也在其他任何的 lambda 演算運算式成功運作,所以
SKI 組合器演算可以完整模擬 lambda 演算,也因此必須是通用。
雖然 SKI 演算擁有 3 個組合器,但是
I
組合器實際上是多餘的。許多運算
式只包含
S
K
,但它們做的事情卻和
I
一樣;例如
S[K][K]
的行為:
>> identity = SKICall.new(SKICall.new(S, K), K)
=> S[K][K]
>> expression = SKICall.new(identity, x)
=> S[K][K][x]
>> while expression.reducible?
puts expression
expression = expression.reduce
end; puts expression
S[K][K][x]
K[x][K[x]]
x
=> nil
所以
S[K][K]
的行為和
I
一樣,而事實上,
S[K]
[
不論哪一種
] 形式的任何
SKI 運算式也是如此。
I
組合者是就算沒有也能活得很好的語法甜頭;只
有兩個組合器
S
K
才足以通用。
Iota
希臘字母 iota (
ɩ
) 是可以加到 SKI ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JSON實務手冊

JSON實務手冊

Tom Marrs

Publisher Resources

ISBN: 9789864766000