Hello,
You can reduce:
file:list($path, false(), '*.txt')[starts-with(., 'retrospect-')]
to the following:
file:list($path, false(), 'retrospect-*.txt')
It is up to you to test and compare both approaches: #1 vs. #2.
Regards,Yitzhak Khabinsky