So, I have a school project in Scheme (working in Dr.Racket enviorment), here is a short run what it is (please note that im not asking any of you to do my schoolwork for me).
I have 2 lists : one is 6 or more characters and the other one is 3 characters.
What we have to dois to combine them in a way that will look like this:
List 1: (1 2 3 4 5 6 7 8)
List 2: (a b c)
To this:
(1 a 2 b 3 c 4 5 c 6 b 7 a 8)
Now, I have an idea in mind on how to do this, which involves "cutting" it to parts and using cons to put them back togther, after using cons to "attach" the letters.
Here`s my problem though: I made a function thats supposed to construct 2 lists into one, but its not working and gives me the names that i used in the function define.
Here is the code:
(define (match List1 List2)
(cons (List1) (List2)))
(match (1 2 3) (5 7 8))
Outcome:
((List1) List2)
What did i do wrong and how do i fix it?