27 ms·
No - rnd() can not return one, but can return zero, at which point you'd access index 0 even with ceil().
by Sebb767 6y ago
No - rnd() can not return one, but can return zero, at which point you'd access index 0 even with ceil().
- vcxy 6y agoAh, thanks! I think I'll stick with rand(indexable_collection) in Julia since anything else just doesn't feel Julian, but I'll remember that for other 1-based languages if I come across it.