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.