03-30-2022 11:51 AM
@altenbach wrote:
Since a FOR loop that iterates zero times basically does not do anything new, here's another silly solution; 🙂
(Also, there is a +1 primitive that you don't even need if you would adjust the random range accordingly. "x+y" is not a useful label, there needs to be a way to stop the while loop. The while loop probably also needs some timing, etc.)
I agree that we would need significantly more context to find a good solution to whatever the OP is trying to
do. e.g. by looking at the real code and not some stripped down example.
- Is the while loop a toplevel while loop?
- What is the purpose of the FOR loop?
- How does it relate to the overall user experience when running the program?
- ...
I missed the simplified vi (I think it came in while I was typing a reply), but I agree that it leaves too much context out to understand the real application.
03-30-2022 12:03 PM - edited 03-30-2022 12:06 PM
And if you don't like red (coercion dots) and green (booleans), one could do as follows: (still silly!!!)
Or even ...
03-30-2022 12:32 PM
What I'm not understanding is the Poly instance. Am I really missing something? Isn't there a U8 instance?
03-30-2022 01:06 PM - edited 03-30-2022 01:09 PM
@JÞB wrote:
Isn't there a U8 instance?
No, only U64, I64, and DBL.
(Also note that there are bugs!)
Ideally, this should be a VIM where the output adapts to the input representation of the lower and upper limit. 😄