How to resolve the algorithm Narcissist step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Narcissist step by step in the Phix programming language

Table of Contents

Problem Statement

Quoting from the Esolangs wiki page: For concreteness, in this task we shall assume that symbol = character. The narcissist should be able to cope with any finite input, whatever its length. Any form of output is allowed, as long as the program always halts, and "accept", "reject" and "not yet finished" are distinguishable.

Let's start with the solution: