The code I provided can be modified to produce that output. Give it a try.
In reply to Re^3: Shorten a list... by toolic in thread Shorten a list... by la