1 # Example of using the 'putter' function to redirect parray output
3 set a
{1 one
2 two
3 three
}
5 # Use 'curry' to create a single command from two words
7 parray a
* [curry stderr
puts]
9 # Same thing, but an alias instead
11 alias stderr_puts stderr
puts
12 parray a
* stderr_puts
14 # Now use a lambda to accumulate the results in a buffer
16 parray a
* [lambda
{msg
} {lappend ::lines $msg}]
17 stderr
puts [join $lines \n]