I now understand the type signature of s (s k)
:
s (s k) :: ((t1 -> t2) -> t1) -> (t1 -> t2) -> t1
And I can create examples that work without error in the Haskell WinGHCi tool:
Example:
s (s k) (\g -> 2) (\x -> 3)
returns 2
.
Example:
s (s k) (\g -> g 3) successor
returns 4
.
where successor
is defined as so:
successor = (\x -> x + 1)
Nonetheless, I still don't have an intuitive feel for what s (s k)
does.
The combinator s (s k)
takes any two functions f
and g
. What does s (s k)
do with f
and g
? Would you give me the big picture on what s (s k)
does please?
S (S K)
is missing. Is this the sames
andk
in #9592691 ? – Duologue