Seite 1 von 1

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

Verfasst: 13. Dez 2019 14:38
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

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

Verfasst: 13. Dez 2019 17:09
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.

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

Verfasst: 13. Dez 2019 17:57
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.

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

Verfasst: 13. Dez 2019 19:38
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.