Message Boards Message Boards

0
|
3140 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to understand these codes?

Posted 2 years ago
POSTED BY: Zhenyu Zeng
4 Replies
Posted 2 years ago

Zhenyu,

The red s means the S combinator was applied. Similarly, the blue k means the K combinator was applied. There may be many parts in the expression that match S or K, the order in which they are applied results in a different evolution, but the same final result. This is discussed in detail in the "Updating Schemes and Multiway Systems" section in Stephen's book.

POSTED BY: Rohit Namjoshi
Posted 2 years ago

Hi Rohit,

It's too difficult to me. I decided to learn it after.

POSTED BY: Zhenyu Zeng
Posted 2 years ago

Hi Rohit,

May you tell me why should the red part be separated from the right part of it? enter image description here

POSTED BY: Zhenyu Zeng
Posted 2 years ago

Hi Zhenyu

Not sure what you mean by

s[s][k][s[s[s]][s]][s]] only has one part

To help understand the pattern matching take a look at

s[s][k][s[s[s]][s]][s] /. s[x_][y_][z_] :> {x, y, z}
(* {s, k, s[s[s]][s]}[s] *)

to see what matches x, y and z.

There are several combinator related functions in the Wolfram Function Repository to help visualize the evolution. e.g.

Magnify[ResourceFunction[
   "CombinatorEvolutionPlot"][(ResourceFunction["CombinatorPlot"][#, 
      "FramedMatches", "SKGlyphs" -> {s, k}] & /@ 
    ResourceFunction["CombinatorFixedPointList"][s[s][k][s[s[s]][s]][s], "SKGlyphs" -> {s, k}]), 
  "StatesDisplay"], .9]

Have you seen this.

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract