Zocam.Span.Arc (Zocam v0.1.0)

Copy Markdown View Source

A directed span between two bounds of the same form, with per-side closings, a step, and an overflow policy.

An arc always lives inside an {:arcs, scope, grain, arcs} node. The node owns the scope and the grain — the arc holds only the bounds, so the two can never disagree. The smart constructors guarantee that every arc's chains match its node.

On a bare coarse unit the closing covers the whole unit: until: february, right: :open excludes all of February; right: :closed includes all of it.

step: nil means "no sampling": the arc covers the whole block between its bounds. A {1, grain} step is the same set, so the constructors normalize it to nil — one canonical spelling for one meaning. The overflow policy comes from the bound points and acts where a day number lands in a short month.

Summary

Types

t()

@type t() :: %Zocam.Span.Arc{
  from: Zocam.Point.chain(),
  left: Zocam.Intervals.closing(),
  overflow: Zocam.Point.overflow(),
  right: Zocam.Intervals.closing(),
  step: Zocam.Span.step() | nil,
  until: Zocam.Point.chain()
}