Ex 09: Tail recursion with receiver

Osterlaus
BSc Spammer
BSc Spammer
Beiträge: 1263
Registriert: 23. Aug 2007 12:46
Wohnort: DA

Ex 09: Tail recursion with receiver

Beitrag von Osterlaus »

Hi there,
can anybody explain when we have to return some receiver call like k(0) and when not to do so? Would it be possible to give extra test cases for the programming homework that check whether this is done right?

Benutzeravatar
cofi
Mausschubser
Mausschubser
Beiträge: 86
Registriert: 22. Sep 2009 12:07

Re: Ex 09: Tail recursion with receiver

Beitrag von cofi »

The other name for "receiver" is "continuation". From here it's clearer when you have to call that function: You call it when you are done with the current computation step and you are ready to let the computation continue.

Antworten

Zurück zu „Archiv“