日本語 · English

strideBy — step by width, “every w”

Translated from the canonical Japanese page reference/strideBy.md. The source_sha above records the source revision; a consistency check flags this page when the Japanese original changes.

Category: stride (body-layer core) · Signature: strideBy(w, from:) : Stream -> Stream · name settled (spec §5.4)

Meaning

Marks points at an equal spacing of width w from the origin from:. Where stride takes “every n points of the input” (counting in points), strideBy takes “every physical quantity w” (stepping by width) — the operator for cycles that do not ride the calendar’s rhythm (one Martian sol, every 90 minutes, every 36 hours); the two are split into separate operators because the argument kinds differ (spec §4.7 · ADR-38).

The origin from: is mandatory (ADR-31; the rule shared with stride across the family).

Examples

Every 36 hours (a composite width of elapsed time):

# eval: 2026-01-01..2026-01-05
@JP
everyInstant |> strideBy(36h, from: 2026-01-01)
#=> 2026-01-01 2026-01-02T12:00 2026-01-04

For every Martian sol, see the example in everyInstant (strideBy(24h39m35.244s, from: …)).

Pitfalls

stride · everyInstant · width literals (spec §5.5 · ADR-11/12/28).