Changes for page Recursion - doiwritemyself?
Last modified by Qfwfq on 2019/07/25 22:24
Change comment: There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -11,6 +11,8 @@ 11 11 12 12 Follow the link, and click Run. A program outputs the source code of all those programs whose output does not include their own source code. Does it output its own source code? This is an adaptation of Russell's paradox in set theory. This github repository also includes "Quine"s - code that evaluates to itself (it does write itself, without such infinite, interminable, anxieties!): [[https:~~/~~/github.com/notkrd/doiwritemyself>>url:https://github.com/notkrd/doiwritemyself]]. The code templates for these are adapted from the Rosettacode website. 13 13 14 +[[image:diwm.png||alt="Screenshot of a browser-based clojure REPL executing doiwritemyself?" height="589" width="1000"]] 15 + 14 14 == Theory: [[Recursion>>https://en.wikipedia.org/wiki/Recursion]] == 15 15 16 16 Recursion is the formal theory of self-reference: the way a process does something, then invokes itself again. In the formal language of lambda calculus, an operator known as the y combinator, now chartered as a distributor of investment capital, is a sequence of steps that transform a function that seems only to operate on others into one that considers itself.