two level splatter TCL
问题 If I have a procedure or a command in TCL, with variable number of arguments, one can use, if a list's elements are as an input, the "splatter" operator, for example: set a [list "ko" ] set m [ list "ok" "bang" ] lappend a {*}$m But, what if I want to "twice splatter"? I.e., flatten 2 levels? Using it twice, in sequence, does not work: set a [list "ko" ] set m [ list [ list "ok" ] [ list "bang" ] ] lappend a {*}{*}$m Will error out on extra character. 回答1: You've noticed that {*}