nthnext returns the sequence after removing a specified number of elements from the front of a sequential input. Unlike nthrest, it returns nil when that many elements are unavailable. section 10.2
Use nthnext with these expectations:
- Pass the collection and required number n as (nthnext coll n). section 10.2
- Treat negative n as zero; expect nil when n extends beyond the input. section 10.2
Selecting a later sequence
The sequential-selection family includes both (nthrest xs n) and (nthnext xs n); nthnext is the boundary-sensitive choice when exceeding the input should produce nil.
