Saturday, February 05, 2022

Creating Empty Lists

Just what it 'says on the tin', create a list of empty strings.

 

proc emptyList {n} {
    for {set i 0} {$i < $n} {incr i} { lappend res {} }
    return $res
}

No comments: