Hi,
still lazy, but conscientious ...
... an improvement and a simplification:
1. It's nicer to remove the tail of the list-dir function that we are not
using.
2. Of course, we can create the get-list-dir function directly.
get-list-dir: make function! [dir [any-type!] /local file
] head clear at insert at copy second :list-dir 4 'return 4
>> source get-list-dir
get-list-dir: func [dir [any-type!] /local file
][
dir: throw-on-error [
either value? 'dir [
read dir
] [
read %.
]
] return
dir: sort dir]
Elan