Here you can see my code, as it is for now. Must admit, I’m kinda lost why it doesn’t work. I think there is something about the syntax I’m not understanding.
There are several problems with the code. e.g. xs // 2. In Mathematica, // is the postfix form of function application so xs // 2 evaluates to 2[xs]. Take a look at this and this to get more familiar with Mathematica.
From the code it looks like you are trying to implement cube root finding using the Newton-Raphson method. Here is one way to do that.
Need to find the value of x for which the function f is zero.
The stopping criterion presented in that answer (Abs[func@#] > precision &) is a dangerous! If the function is “flat” near a zero, you could stop when the magnitude of the current approximation is close to 0 yet the approximation is far from 0. It is much better to base the stopping criterion primarily on how far apart the x-values are from each other (e.g., compare the current and preceding approximations). Of course it doesn’t hurt to add also a condition about the y-value of the function; but usually it’s better, then, to use some kind of relative error rather than absolute error.