Ad
  • Custom User Avatar

    I think you have the tests backwards. Your predicate is expected to behave like a generator, and produce single values at a time. The tests check for this by gathering all the values produced into a list. Your solution however produces one single list of all values at once, so the tests collect that into a list, creating a nested list, while the expected result is just a list.

    You need to rebuild your solution to produce individual values. Eg instead of this behaviour:

    foo([1, 2, 3]).
    

    You need behaviour like this:

    foo(1).
    foo(2).
    foo(3).
    
  • Default User Avatar

    the initial code tells you:

    register a goes into registers['a'], register b goes into registers['b'], etc.

    this is not what you are doing, you are putting a into registers[0], b into registers[1], etc