How to resolve the algorithm Thue-Morse step by step in the PicoLisp programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Thue-Morse step by step in the PicoLisp programming language

Table of Contents

Problem Statement

Create a Thue-Morse sequence.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Thue-Morse step by step in the PicoLisp programming language

Source code in the picolisp programming language

(let R 0
   (prinl R)
   (for (X 1 (>= 32 X))
      (setq R
         (bin
            (pack
               (bin R)
               (bin (x| (dec (** 2 X)) R)) ) ) )
      (prinl (pack 0 (bin R)))
      (inc 'X X) ) )

  

You may also check:How to resolve the algorithm Even or odd step by step in the Neko programming language
You may also check:How to resolve the algorithm Abbreviations, easy step by step in the Picat programming language
You may also check:How to resolve the algorithm Sorting algorithms/Heapsort step by step in the 360 Assembly programming language
You may also check:How to resolve the algorithm Sorting algorithms/Counting sort step by step in the D programming language
You may also check:How to resolve the algorithm Constrained random points on a circle step by step in the Tcl programming language