Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thanks for the clarification. Seems I misunderstood the problem instructions.
In Prolog, when running the test cases for the 'range' predicates, the tests are returning a list of a list instead of a single list. For example, for
range(5)
, I would expect the result to be[1, 2, 3, 4, 5]
, but the test returns[[1, 2, 3, 4, 5]]
.It seems the issue lies in how the 'findall/3' predicate is used within the tests. It actually collects the resulting list of the 'range' predicates in another list.
In C, when I print the registers[] array inside the function, the output matches the expected results exactly (at least when running the first test cases). Despite this, the tests still fail, showing that the registers are zero, not matching the expected output. What is the correct way to modify the array, so that the test framework correctly evaluates the results?
This comment is hidden because it contains spoiler information about the solution