Quine in Erlang
How could I have forgotten about the friend of mine who's fond of Erlang? :-D
Here's another one for the Eshell REPL:
And as I know he's also in love with LISP, here's a Haskell variant rewritten in that spirit:
-module(q).
-export([s/0]).
s()->io:format("~s~p.\n",[p(),p()]).
p()->"-module(q).\n-export([s/0]).\n\ns()->io:format(\"~s~p.\\n\",[p(),p()]).\n\np()->".
Here's another one for the Eshell REPL:
fun(P)->io:format("~s\n~p).\n",[P,P])end(
"fun(P)->io:format(\"~s\\n~p).\\n\",[P,P])end(").
And as I know he's also in love with LISP, here's a Haskell variant rewritten in that spirit:
(\ (x)-> ((++) x (show x)))"(\\ (x)-> ((++) x (show x)))"
Comments
Post a Comment