Assignment 07 Task 3 (first-class continuations) evaluation order

Moderator: Konzepte der Programmiersprachen

Locke
Neuling
Neuling
Beiträge: 8
Registriert: 26. Mai 2010 16:00
Wohnort: Rodgau

Assignment 07 Task 3 (first-class continuations) evaluation order

Beitrag von Locke »

I solved Task 2 with left-to-right evaluation, as no order was specified in the assignment.

However, with left-to-right evaluation the tests 10 and 16 of Task 3 fail. Therefore I changed the evaluation order in Task 3 to right-to-left.

Can you confirm that we have to use the right-to-left evaluation order? Should I now also change the evaluation order in Task 2?

Also, I had to change the

Code: Alles auswählen

import Task3Solution._
to

Code: Alles auswählen

import Task3._
in Task3Test.scala

mirko-koehler
Moderator
Moderator
Beiträge: 82
Registriert: 16. Okt 2017 12:28

Re: Assignment 07 Task 3 (first-class continuations) evaluation order

Beitrag von mirko-koehler »

The tests are correct with the normal left-to-right evaluation order.
Also, I had to change the import Task3Solution._ to import Task3._ in Task3Test.scala
Fixed.

Locke
Neuling
Neuling
Beiträge: 8
Registriert: 26. Mai 2010 16:00
Wohnort: Rodgau

Re: Assignment 07 Task 3 (first-class continuations) evaluation order

Beitrag von Locke »

mirko-koehler hat geschrieben:
13. Dez 2019 17:09
The tests are correct with the normal left-to-right evaluation order.
Thanks, I have to rethink my approach then.

KimB
Neuling
Neuling
Beiträge: 5
Registriert: 16. Okt 2019 00:25

Re: Assignment 07 Task 3 (first-class continuations) evaluation order

Beitrag von KimB »

I also had these tests fail for me on the first try with short-circuiting and/or operators, but got them working when always evaluating both sides.

Antworten

Zurück zu „Konzepte der Programmiersprachen“