proc cons_list {x y z} {
# construct list of 3 elements
return [list $x $y $z]
}
# running proc
set result [cons_list 1 "Hello" 3]
# result
puts "result = {$result}"
puts "1.part of result = [lindex $result 0]"
puts "2.part of result = [lindex $result 1]"
puts "3.part of result = [lindex $result end]"