So basically using the shell of something like Xerox's PARC Interlisp-D and threading macros.
I would be something like this,
(->
ls
myfunc
sort -r -n
(> list))
Followed by "Select => Execute" with the mouse, or "Execute last form" with keyboard shorcut.