Hi Lindsay,

> : (nil (setq *BitsSA (sort (make (map link (chop "ABRAABRACADABRA"))))))

*BitsSA is a list of lists of characters:

   : (more *BitsSA)
   ("A" "A" "B" "R" "A" "C" "A" "D" "A" "B" "R" "A")
   ("A" "B" "R" "A")
   ("A" "B" "R" "A" "A" "B" "R" "A" "C" "A" "D" "A" "B" "R" "A")

> : (rank (chop "BR") *BitsSA)
> -> ("R" "A" "C" "A" "D" "A" "B" "R" "A")

This does not make sense. You search the ranking list with a *list* argument
(chop "BR"), i.e. ("B" "R")

Same here:

> : (rank (chop "BRA") *BitsSA T)            # ???
> -> NIL

So you compare the CARs of *BitsSA - which are characters (i.e. symbols) - with
lists. A list, however, is always greater than a symbol.

>From https://software-lab.de/doc/ref.html#cmp:

   For differing types, the following rule applies: Numbers are less than
   symbols, and symbols are less than lists.

♪♫ Alex

UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to