It's trivial to open-code; it may not be worth the benefit to have it as a method. If it is kept, perhaps change the check from `n <= 1` to `n == 0` to be clearer as to the intent, as only `n == 0` would cause misbehavior in `gen_range()`.