Any SML coders able to translate this to Python?
I have this snippet of SML code which I'm trying to translate to Python:
fun isqrt n = if n=0 then 0
else let val r = isqrt (n/4)
if n < (2*r+1)^2 then 2*r
I've tried reading up on SML and can't make heads or tails of the
The best I've come up with is this:
if n == 0:
r = isqrt(n/4)
if n < (2*r+1)**2:
but I don't understand the let ... in part so I'm not sure if I'm doing it
"Ever since I learned about confirmation bias, I've been seeing it everywhere."
-- Jon Ronson