strict (version 0.0.0.9000)

shim_colon: Strict version of `:`

Description

This version of `:` throws an error if `from` is positive and `to` is zero, to make the error more obvious if you've used `1:length(x)` instead of [seq_along()]

Usage

shim_colon(from, to)

Arguments

from, to

Passed on to [seq()]

Examples

Run this code
# NOT RUN {
x <- numeric()
seq_along(x)
lax(1:length(x))
# }

Run the code above in your browser using DataLab