Hello,
I’m not sure if I’m reinventing the wheel here or not, but I could not find an easy way to simply swap two elements in a list. For example, given the list (1 2 3 4 5 6 7), I couldn’t find a simple way to swap the first and second elements to (2 1 3 4 5 6 7) without doing some unwieldy patching. So, wanting to avoid the unwieldy patching I had been doing for years, I created a little Lisp function to do it. The main concern was to have a simple solution I could use in recursive loops. I’ve attached the function here for perusal. Again, forgive me if this duplicates functionality already found elsewhere. If not, maybe someone will find it useful.
Thanks,
DGM