fun first1 {ndx:int | ndx >= 1} (ndx: ulint ndx, nzer: ulint): (ulint, ulint) =
if (ndx land 1ul) = 0ul
then first1 ((ndx >> 1ul), nzer + 1ul)
else (ndx, nzer)
the above code gives the following error:
error(3): the symbol [>>] cannot be resolved as no match is found.
as you can see, I tried to introduce a dependent type, mostly in speculation of the conditions where the compiler would approve of a bit shift, or consider it "safe"
Is there a general overview for bitwise operations in ats2? I haven't been able to find anything in the html book from the main site.