Posted to tcl by frerich at Tue Apr 26 09:39:23 GMT 2016view pretty

proc p {x} {
    proc q {} "
        return $x
    "

    # 'can't read "q": no such variable'
    # return $q

    return [list q]
}

# Would like this to work:
# puts [p 3]
puts [[p 3]]