lstcat() can't concatenated input list() with objects of types>10. In addition, it is very slow for very long lists.
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
A) Unlike what it's documentation tells, lstcat() can't concatenated input list(s) with any other objects: objects of types>10 are ignored.
B) In addition, lstcat() is very slow for very long lists to be merged.
A)
L = lstcat(list(sin,3), cos, 1:$, list(strcat,"--"));
size(L)
L(2)==3
L(3)==strcat
--> L = lstcat(list(sin,3), cos, 1:$, list(strcat,"--"));
--> size(L)
ans =
4.
--> L(2)==3
ans =
T
--> L(3)==strcat
ans =
T
B)
--> L = list(); L(1e6)=1;
--> size(L)
ans =
1000000.
--> tic; Lc = lstcat(L,L); toc()
ans =
45.967264
ERROR LOG:
----------
none. Wrong answer or long processing time
HOW TO REPRODUCE THE BUG:
-------------------------
// A)
L = lstcat(list(sin,3), cos, 1:$, list(strcat,"--"));
size(L)
L(2)==3
L(3)==strcat
// B)
clear L, L = list(); L(1e6)=1;
tic; Lc = lstcat(L,L); toc()
OTHER INFORMATION:
------------------
Source:
https://github.com/rdbyk/balisc/issues/862
https://github.com/rdbyk/balisc/issues/863