The '''S''' combinator is a sort-of generalised function application from combinator theory, the other most basic one being [K].
proc S {f g x} {
$f $x [$g $x]
}
See [Hot curry] or [Combinator engine] for much more.
[[Can someone provide some context here on this page as to how this would be used ''in the real world''?]]
[RS]: It certainly is less evidently usable than [K]. You can for example compose identity out of S and two calls to K:
I = S K K
but in the "real Tcl world" one would of course code identity (which is useful at times) as
proc I x {set x}