join problem

For the Compleat Fan
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

join problem

Post by cormullion »

I accidentally did this:

Code: Select all

(join '(1 2 3))
rather than

Code: Select all

(join '("1" "2" "3"))
and join wasn't happy - I had to kill the newLISP session.

In general, should user-errors like this be guarded against in the code, or should we be allowed to shoot ourselves in the foot?

Or perhaps join could do this:

Code: Select all

(join (sequence 1 10))
;-> 12345678910
although I would have written

Code: Select all

(join (map string (sequence 1 10)))
[/code]

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Thanks for this discovery, this will be taken care of in the 8.9.15, should give an error message.

Lutz

Locked