Evaluated proc rlist sub { set json [json2dict [wget http://www.reddit.com/r/$sub.json]]; set out ""; for {set i 0} {$i < [llength [lindex $json 3 3]]} {incr i} { append out "[rval name $json]\n[rval title $json]\n[rval selftext $json]\nby [rval author $json]\n" }; . $out }