Programming Brain Teaser #6: Fixed-point principle
As promised last time, let’s do something more serious today…
Let a be any expression. We will call x the fixed point of expression a if x names ax. (Reminder: lower-case letters in our programming language represent a combination of upper-case letters.)
The fixed-point principle says that for each expression a there exists its fixed point x. Furthermore there is a (quite simple) “manual” for constructing the fixed point x of any expression a.
So the question of the day is: can you find that “manual” proving fixed-point principle?
(E.g. a program x that names ABCx, for a = ABC.)
« Programming Brain Teaser #5: More curiosities - Advertisers Should Love AdBlock Plus »