I think that using Int
for both ordinal and cardinal numbers is one of the leading causes of off-by-one errors. I made a small GitHub repo to illustrate how it could be done differently in Scala 3.
1 Like