Sit back and have a read through your xx‑‑read‑colours
function.
If you’re still a bit suspicious about how it terminates, why not try
evaluating it in the *scratch*
buffer and writing out the steps?
Define the helper function
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
Get a colour string as input
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
Bind it to
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
If it is blank
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
Return
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
If not, construct a list
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
with
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
and the remaining colours to be inputted as the rest.
(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))