Narcissist: Difference between revisions
Content added Content deleted
(Included Swift) |
|||
Line 94: | Line 94: | ||
Only checks the first line of stdin: |
Only checks the first line of stdin: |
||
<lang lisp>#1=(PRINT (EQUAL (WRITE-TO-STRING '#1# :CIRCLE 1) (READ-LINE *STANDARD-INPUT*)))</lang> |
<lang lisp>#1=(PRINT (EQUAL (WRITE-TO-STRING '#1# :CIRCLE 1) (READ-LINE *STANDARD-INPUT*)))</lang> |
||
=={{header|D}}== |
|||
<lang D>import std.file; import std.stdio; import std.string; void main() { auto source = readText("narcissist.d").chomp; auto input = readln().chomp(); if (source == input) writeln("accept"); else writeln("reject"); }</lang> |
|||
=={{header|Déjà Vu}}== |
=={{header|Déjà Vu}}== |
||
<lang dejavu>!. = !prompt "Enter my code: " concat( swap !decode!utf-8 !encode!quoted dup swap ) "!. = !prompt \qEnter my code: \q concat( swap !decode!utf-8 !encode!quoted dup swap ) "</lang> |
<lang dejavu>!. = !prompt "Enter my code: " concat( swap !decode!utf-8 !encode!quoted dup swap ) "!. = !prompt \qEnter my code: \q concat( swap !decode!utf-8 !encode!quoted dup swap ) "</lang> |