Narcissist: Difference between revisions

Content added Content deleted
(J)
(Added PicoLisp)
Line 41: Line 41:
Based upon [[Quine#Using_eval|one of the quines]]. Outputs 'true' if source is equal to inputted line (newline terminated), 'false' otherwise.
Based upon [[Quine#Using_eval|one of the quines]]. Outputs 'true' if source is equal to inputted line (newline terminated), 'false' otherwise.
<lang javascript>var code='var q=String.fromCharCode(39);print("var code=" + q + code + q + "; eval(code)" == readline())'; eval(code)</lang>
<lang javascript>var code='var q=String.fromCharCode(39);print("var code=" + q + code + q + "; eval(code)" == readline())'; eval(code)</lang>

=={{header|PicoLisp}}==
<lang PicoLisp>(de narcissist (Str)
(= Str (str narcissist)) )</lang>
Output:
<pre>: (narcissist "(Str) (= Str (str narcissist))")
-> T</pre>


=={{header|Tcl}}==
=={{header|Tcl}}==