Seite 1 von 1

### Issues in Assignment02 template

Verfasst: 5. Nov 2019 18:13
Hello,

while completing the second assignment I noticed a few issues with the provided template:
• The test for the fibonacci implementation in ExtendedF1LAE tries to import everything from a non-existing FibonacciSolution object, this needs to be changed to simply the Fibonacci object
• There's two identical copies of the DeBruijn task file and its tests, one with the correct spelling and one with a typo ("DeBrujin"), the workaround is to copy-and-paste the correct solution from one file to the other
I hope this helps everyone finding the same issues and they get fixed in a timely manner.

Regards

Jean-Pierre

### Re: Issues in Assignment02 template

Verfasst: 6. Nov 2019 16:53
Hi Jean-Pierre,

if I understand your comment right, you understood, what I have to do at the Fibonnacci task.

I spent a lot of time now just by trying to understand the ifc, so maybe you (or someone else) can help me and explain what I shall do.

As far as I understood, I shall write a function fundef which takes three symbols as argument and returns Num(fibNumber).

The first I do not understand is, why the function shall take three symbols as argument? And why are the three symbols always the same? This does not make any sense

So may someone help me in understanding what the input and what the output of the function should be?

thank you so much

### Re: Issues in Assignment02 template

Verfasst: 6. Nov 2019 18:57
It is always good, to look at the public tests:

" val testcases = Table(
("expectation", "expr"),
(0, Num(0)),
(1, Num(1)),
(1, Num(2)),
(3, Num(4)),
(5, Num(5))
)

forAll(testcases) { case (expectation, expr: F1LAE) =>
test("test " + expr) {
assertResult(expectation) { interp(App('fib, expr), fibDefs) }
}
}"

Now, change the Map fibDefs in such a way, that it contains a function with name 'fib that takes Num[Int] as a parameter and outputs Int's
Does that help?

### Re: Issues in Assignment02 template

Verfasst: 7. Nov 2019 10:50
Hi,