标签:att des for amp esc flatten lis proc out
unless(fboundp(‘ycFlattenList)
procedure(ycFlattenList(listin)
prog((output)
foreach(arg listin
if(listp(arg)
output = append(output ycFlattenList(arg));then
output = append1(output arg);else
);if
);foreach
return(output)
);prog
);ycFlattenList
)
describe
输入一个list,返回一个被Flatten的list。
example
ycFlattenList(list(1 2 3) list(4 5))
=>(1 2 3 4 5)
标签:att des for amp esc flatten lis proc out
原文地址:https://www.cnblogs.com/yeungchie/p/13020531.html