3 ms·
> I really want my zeroth frequency in my zeroth bin That's precisely what it does! > I also cringe at languages where -1 mod N does not equal N-1. julia> mo
by simonbyrne 8y ago
> I really want my zeroth frequency in my zeroth bin
That's precisely what it does!
> I also cringe at languages where -1 mod N does not equal N-1.
julia> mod(-1,10)
9
- jacobolus 8y agoA 1-character infix operator is much cleaner to read than a 3-character name of a 2-parameter function. But admittedly when you use 1-indexed arrays, any kind of modulo operator becomes pretty inconvenient a lot of the time (lots of futzing to avoid off-by-1 or boundary errors). So maybe it doesn’t matter in the Julia context.