ClockPattern

ClockPattern :: # (opaque)

Ordered clock candidates within one civil day. Empty selector lists inherit the anchor field; explicit selectors expand it. Microseconds stay anchored. This is a candidate layer, not a recurrence rule or timezone interpretation.

new : ClockTime, Spec -> Try(ClockPattern, [TooManySelectors, InvalidHour, InvalidMinute, InvalidSecond, UnsupportedLeapSecond])

O(s log s) construction, with at most 4096 supplied values per field. Retains at most 144 distinct field values, shared by its iterators.

definition : ClockPattern -> { hours : List(U8), minutes : List(U8), seconds : List(U8), microsecond : U32 }

Effective normalized fields, including inherited defaults. These are not the original selector spelling and do not materialize clock combinations.

count : ClockPattern -> U64

At most 86400 candidates. Only the distinct selector fields are stored.

at : ClockPattern, U64 -> Try(ClockTime, [OutOfRange])

Return the clock at a zero-based position in the checked clock product. An index outside its length returns OutOfRange; the anchor microsecond field is retained.

iter : ClockPattern -> Iter(ClockTime)

Lazy, infallible traversal of validated candidates. Construction does not allocate their Cartesian product; each advance constructs one clock label.

to_inspect : ClockPattern -> Str

Return a bounded diagnostic summary without advancing cursors or enumerating occurrences. Use typed accessors for application logic; this text is not a storage format.

Spec : { hours : List(U8), minutes : List(U8), seconds : List(U8) }

Hour, minute and second selectors. Empty fields inherit the corresponding anchor field in ClockPattern.new; subdaily recurrence supplies its own documented effective defaults.