Skip to content

Main content

List Stride Delete Surviving Position Tool

Calculate list stride delete surviving position from explicit caller-supplied inputs.

Loading tool…

Description

Mark index removed when it is at or after start on the stride progression.

An index map tracks where one item lands after a structural list operation. Zero-based element positions differ from boundary cursors, and missing destinations need a sentinel.

Mark index removed when it is at or after start on the stride progression.

When to use this tool

Use List Stride Delete Surviving Position when you need one item's position under an explicit list transformation.

How to use the tool and how it works

  1. Enter index, start, stride. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read removed, newIndex. Inspect removed before interpreting the associated values.

Mark index removed when it is at or after start on the stride progression. Count progression positions strictly before index and subtract them for surviving newIndex; removed entries return -1.1

Input fieldMeaning and unitsAccepted input
indexIndexRequired. Safe integer; minimum 0.
startStartRequired. Safe integer; minimum 0.
strideStrideRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
removedRemovedRequired. Boolean.
newIndexNew IndexRequired. Safe integer.
json
{
  "input": {
    "index": 8,
    "start": 1,
    "stride": 3
  },
  "output": {
    "removed": false,
    "newIndex": 5
  }
}

Limitations and assumptions

  • This maps an unbounded deletion pattern without a list length; -1 must not be used as a surviving index.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Apply the operation to a small representative list when checking a consuming language's indexing and slicing semantics.

References

  1. Calculation and input contract: list/list-stride-delete-surviving-position — tool.io

Similar or alternative tools