[PRL] Palindromic programs
Doug Orleans
dougorleans at gmail.com
Tue Jan 31 12:39:28 EST 2012
This morning I wondered what the longest (ignoring whitespace)
palindromic Racket program was. Obviously any palindromic integer is
a program, but that's not too interesting. There's also "(quote
etouq)" but I couldn't think of a good way to extend that. Then I
came up with this:
(letrec ((letrec letrec) (certel certel)) certel)
This can be extended indefinitely:
(letrec ((letrec letrec) (gateman stressed) (nametag desserts)
(stressed gateman) (desserts nametag) (certel certel)) certel)
These just return #<undefined>, though. Is there a palindromic
program that actually does something interesting?
--Doug
P.S. Here's a palindromic quine in C:
http://www.derf.net/palindromes/old.palindrome.html#CODE
More information about the PRL
mailing list