Constructing quines (self-reproducing functions)

前端 未结 5 1523
走了就别回头了
走了就别回头了 2021-02-19 03:47

Has anyone constructed a quine (\"A program that generates a copy of its own source text as its complete output\": http://www.nyx.net/~gthompso/quine.htm) in R? (The [quine] ta

5条回答
  •  悲&欢浪女
    2021-02-19 04:40

    While I'm not sure if this "counts" from a quine perspective (I stumbled across this question while trying to verify if it does), the script

    function(){}
    

    will output function(){}. This works on the same principle as Joshua Ulrich's answer, just pared down to the essentials.

提交回复
热议问题