Need help in Scheme Programming - Mulltiplying list elements
Hello everyone, I've ran into this site and was wondering if you can advise me something.
The program I'm trying to write called (multListsA lst1 lst2) which receives 2 lists and returns a new list in which the i'th element is the product of the two i'th elements from the 2 given lists. MOREOVER, in case that one list is shorter than the other, the shorter list should be used from the beginning again. Which means 2 things:
1) The result list should have the same length as the longer list.
2) I have to use the modulo option at some point.
I'm trying to write a recursive solution to that nice program, but I can't seem to find the right formula and the right use of modulo to solve this.
Can you please help me?
Thanks in advance
What is "modulo option"?
You're referring to the place in the list, dividing in the smaller list's length in order to stay within the list until the longer one is finished.
I know my explaination is lame, may be someone understood it anyway?
|All times are GMT -4. The time now is 18:33.|