6:26:39beachYou will first CONS a list with NILs in it and then another list without them.
6:26:53beachWhether that's acceptable depends on your application.
6:39:21beachdbotton: I recommend you do the thing that gives the most readable and maintainable code. Then you can measure whether your solution needs performance improvements and if so where.
6:40:00beachdbotton: Programmers are notorious for being wrong about what parts of the code take the most resources.
6:40:51dbottonAgreed. The remove nil version in this case more elegant and efficient enough for its purpose
6:41:42beachThis is especially true for inexperienced programmers, who often fail to design good algorithms and data structures, and instead concentrate on what they (think they) know, i.e. low-level performance.
6:41:45dbottonI tend to never optimize first round and try for readability first
14:41:28dbottonMy first paid for program was 40 years ago. A program for the psych department of Nova university (south Florida us) running on trs-80s attached to a cables so could load the app to many machines from the same tape recorder
14:42:10dbottonWritten in basic and hand translated assembly poked in to memory
15:02:14pjbdbotton: nice. Mine was a program in basic on TO7 to drive some lights on an advertizing panel for some conserve can manufacturer.