Created
January 18, 2016 21:25
-
-
Save olexandr-konovalov/38938a74937c882f713d to your computer and use it in GitHub Desktop.
Quine: a GAP program that prints itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s := [ "Print(\"s := \", s, \";; \");", "for t in s do Print(t); od;" ];;Print("s := ", s, ";;" );for t in s do Print(t); od; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
You may also wish to start GAP with
-q
option, then the output will be aligned with the input so it will be more obvious.