In Idris, how to convert from a Double to a Nat by floor, dropping the decimal points. I tried cast:
cast {to=Nat} num
However did not work.
When checking an application of function Main.takeLeftOfHalfLength:
Can't cast from Double to Nat
Well that's to be expected as its not very explicit how the cast would work, loss of information.
However I still wish to cast from Double to Nat, how can it be done?
I discovered divNat function which lets me divide a Nat, but I'll leave the question here