I like anagrams. I like programs that reference their own source code. So this challenge combines them!

Input. The input to the program could be anything, including letters, numbers, symbols, you name it.

Output. A truthy value if the input's characters can be rearranged to give the source code, and a falsy value if the input's characters cannot. This does include spaces: the input must have the same number of spaces as the source code.

Scoring. Lowest amount of characters wins, with one exception: the program must use at least three distinct characters.

  • 1
    \$\begingroup\$ Related: Write the shortest self-identifying program (a quine variant) \$\endgroup\$
    – tsh
    Commented Feb 22, 2021 at 3:44
  • 1
    \$\begingroup\$ Related: Is it a substring of itself? \$\endgroup\$
    – tsh
    Commented Feb 22, 2021 at 3:44
  • 3
    \$\begingroup\$ An almost identical challenge was (arguably) closed as a dupe of the more generic anagram detection challenge. \$\endgroup\$
    – Arnauld
    Commented Feb 22, 2021 at 3:45
  • 2
    \$\begingroup\$ Unfortunately, this is a duplicate of either of the challenges linked by @Arnauld. I’ve voted to close as a duplicate of the generic anagram question, as I agree with the arguments made in the comments of the closed question. For those who disagree, consider voting to reopen the older question and closing this as a duplicate of that \$\endgroup\$ Commented Feb 22, 2021 at 3:51


Browse other questions tagged or ask your own question.