Implement helper function without sort/print for ls