Ex 5, Task 6

tzeenie
Mausschubser
Mausschubser
Beiträge: 80
Registriert: 14. Okt 2008 20:04

Ex 5, Task 6

Beitrag 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...

Benutzeravatar
sproksch
Computerversteher
Computerversteher
Beiträge: 346
Registriert: 15. Apr 2004 17:56

Re: Ex 5, Task 6

Beitrag 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?

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: Ex 5, Task 6

Beitrag 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:)

Benutzeravatar
Alp.traum
Mausschubser
Mausschubser
Beiträge: 85
Registriert: 3. Feb 2004 15:15
Wohnort: Darmstadt
Kontaktdaten:

Re: Ex 5, Task 6

Beitrag 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?

kde
BASIC-Programmierer
BASIC-Programmierer
Beiträge: 123
Registriert: 19. Dez 2006 10:29
Kontaktdaten:

Re: Ex 5, Task 6

Beitrag 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?
Tutor in SE: Design (& Construction) SS 2011

Antworten

Zurück zu „Archiv“