Seite 1 von 1

Ex 5, Task 6

Verfasst: 3. Jun 2009 18:24
von tzeenie
Has something been said during the exercise about short-hands or notation for the computation trace in task 6? Or are we really supposed to write 100+ lines of repeating fragments of code? I've started from scratch for the third time now, either because I messed up my indendation or made a copy n paste mistake somewhere or the like. :(
This is really tiresome...

Re: Ex 5, Task 6

Verfasst: 3. Jun 2009 18:38
von sproksch
Same Problem here... 151 lines of code so far, but I'm sure there are still bracket errors in there. Perhaps we misinterpreted the task, or there is simply a shorter way to write it down...

Are we allowed to shorten the computation of merge?

Re: Ex 5, Task 6

Verfasst: 4. Jun 2009 12:26
von sewe
@tzeenie: Yes, if the same pattern occurs over and over again, replacing stuff with an ellipsis is fine. (In hindsight, using a shorter list may have been sufficient. :oops:)

Re: Ex 5, Task 6

Verfasst: 4. Jun 2009 17:28
von Alp.traum
Hm, i don't know if i made a mistake here, but i have only 30 lines of stacktrace code, and i don't think that i missed steps between them. Is that possible?

Re: Ex 5, Task 6

Verfasst: 4. Jun 2009 19:35
von kde
hey,
do we need to trace the take, drop and length calls or can we just omit them. E.q. is (mSort [1,2,3]) resulting in (merge (mSort [1]) (mSort [2,3])) sufficient in a single trace step?