Programming Brain Teaser #3: Repetition riddle

26 March 2013 by Roman Kaspar - Category: Puzzles

Today, we’ll explore one interesting aspect of the repetition rule of our programming language. To solve the puzzle, we’ll use the same two rules as last time, the Q rule (quotation) and the R rule (repetition). In case you need to refresh your memory, the rules are described here.

From the rules definition you know that for any statement x the following is true:
RQx = xx.

But is there such a statement x for which the following is true?:
Rx = xx.

 

Solution

To see the correct solution, click 'Show' button... SelectShow

« - »
COMMENTS