Reputation: 299
Is there a shorthand for returning elements from a nested list? Let's say I have a list defined as
%set fruits {{a apple} {b banana} {c cantaloupe} {d date}}
{a apple} {b banana} {c cantaloupe} {d date}
If, for example, I want to return the second value from the fourth nested set, is there a way to do this other than
%set myvalue [lindex [lindex $fruits 3] 1]
date
If I'm missing a man page, please include a link. I can't seem to find an answer to the above in the Tcl documentation.
Upvotes: 0
Views: 200