I wrote tests for some procedures and refactored the procedures a bit. Sadly, the 'delnode' procedure is kind of a hack because vectors don't support a functional 'vector-set' yet and lists aren't supposed to have one. This new code is still a lot easier to read even with a little assignment. There are third party libraries and unstable standard library modules that provide solutions, but using those isn't ideal.
I wrote tests for some procedures and refactored the procedures a bit. Sadly, the 'delnode' procedure is kind of a hack because vectors don't support a functional 'vector-set' yet and lists aren't supposed to have one. This new code is still a lot easier to read even with a little assignment. There are third party libraries and unstable standard library modules that provide solutions, but using those isn't ideal.