I suspect there is a bug in the tests of this exercise, but I would like to make sure before I submit a report.
When trying to run the tests, I get the following error:
test_collatz_conjecture.zig:5:44: error: root struct of file 'collatz_conjecture' has no member named 'ComputationError'
I'm not sure if it might be an error in my code, I've never touched Zig before today. Thank you.
pub fn steps(number: usize) anyerror!usize
{
var count: usize = 0;
var value: usize = number;
while (value != 1)
{
count += 1;
if (value % 2 == 0)
{
value /= 2;
continue;
}
value = (value * 3) + 1;
}
return count;
}