Quine in R: an expression that evaluates to itself

This R expression evaluates to itself. The trick is that substitute(), when called inside a function, will substitute for the values of the variables in the expression using values from the current environment.

(function (x) substitute(x(x)))(function(x) substitute(x(x)))

Author: Steven Bagley

Created: 2016-04-30 Sat 09:39