@Claude31 I do that thank you... as shown in my OP in the for name in setSorted {} loop. It works perfectly however elsewhere I've been able to whittle that down to a single line - for clarity and as an example - in the second enum above, from the switch through four cases, to the single line EntityDateFormat(rawValue: format)?. Honestly its me being pedantic and trying to better understand enums at the same time. I have a working solution, I just want to make it better. In my humble opinion a single line call to Taxon(rawValue:) is a much more elegant solution than switching through all eight cases, but I'm missing something in my understanding of enums to be able to achieve this. Again as a way of attempting to better explain my problem, I'm hoping to remove the switch statement from the for name in setSorted {} loop and replace it with a single line similar to let nameFormatted = Taxon(rawValue: nameType).formatted(nameComp) but that is probably not the correct syntax?
Topic:
App & System Services
SubTopic:
General
Tags: