Page 1 of 1

Sorting a list or string

Posted: Wed Jul 11, 2018 9:16 am
by joejoe
Hi and thanks!

Code: Select all

(set 'word (join titles " "))
(set 'words (find-all {\w{5,}} word))
(set 'worder (lower-case (string words)))
(println (sort worder))

ERR: list or array expected in function sort : worder
worder looks similar to this: ("one" "two" "three")

How would I best sort this?

Thanks very much for help!

Re: Sorting a list or string

Posted: Wed Jul 11, 2018 10:02 am
by gekkonier
Hello!
Please provide a valid content for the symbol titles, and what output you expect from that given data.
Your code does not work at all ;)

Re: Sorting a list or string

Posted: Thu Jul 12, 2018 1:25 pm
by ralph.ronnquist
You might have meant the third line be

Code: Select all

(set 'worder (map lower-case words))

Re: Sorting a list or string

Posted: Fri Jul 13, 2018 8:46 am
by gekkonier
It's kind of tedious. I hope everything is alright with joejoe...
;)

One can only guess if you don't get any feedback.

Re: Sorting a list or string

Posted: Sat Jul 14, 2018 3:14 am
by joejoe
ralph.ronnquist wrote:You might have meant the third line be

Code: Select all

(set 'worder (map lower-case words))
Ralph, you always bat cleanup around here. Thank you!

It's hard to admit you know what I want to do before I even thought to do it! ;0)

Thanks for this very much and learned going forward. Big thanks for this and all many past!