Assignment 3, Task 3

Talaron
Mausschubser
Mausschubser
Beiträge: 85
Registriert: 26. Apr 2012 11:34

Assignment 3, Task 3

Beitrag von Talaron »

Hello,

are we allowed to use the built-in "zip"-method of the Scala List in this task?

Of course this isn't absolutely necessary (as zip can be modelled with folding itself) but it's making the code much more readable.

Oliver B.
Windoof-User
Windoof-User
Beiträge: 31
Registriert: 14. Okt 2013 09:54

Re: Assignment 3, Task 3

Beitrag von Oliver B. »

Yes, the task description explicitly says that you can use methods from List, except transpose ;)

Talaron
Mausschubser
Mausschubser
Beiträge: 85
Registriert: 26. Apr 2012 11:34

Re: Assignment 3, Task 3

Beitrag von Talaron »

Thanks for the answer!

Wasn't sure since I wouldn't categorize "zip" as a higher order function.

Oliver B.
Windoof-User
Windoof-User
Beiträge: 31
Registriert: 14. Okt 2013 09:54

Re: Assignment 3, Task 3

Beitrag von Oliver B. »

You are right, zip is not higher order. You are still allowed to use it.

Antworten

Zurück zu „Archiv“