I am messing around in language and need some help. I would like to create a swap function that swaps the first with the second. So if (swap '(a b c d e g)) should return (b a d c e g). I dont want to store any values doing it. Is there a function or way to do it in scheme? I have no idea if I would define a list like
(DEFINE list1 (LIST 'a 'b 'c 'd 'e ))
then not sure what to do