Expanded listlen with a case expression