Skip to content

Extend memo interface #67

@parzhitsky

Description

@parzhitsky

Blocked by #48, #59, #66 #70

Would be convenient to get sequence start (the very first sequence number), sequence head (list of the first few numbers, see #48), as well as its end (the last item, same as memo[0]) as named properties of memo:

interface Memo {
  /** Sequence's first number (`undefined` for non-iterable ranges) */
  first: number | undefined;

  /** Sequence's latest number (`undefined` for non-iterable ranges) */
  last: number | undefined;

  /** Sequence head (empty for non-iterable ranges) */
  head: number[];
}

Probably, worth adding (though with consideration of #61) No, this won’t be added:

interface Memo {
  /** Sequence tail (empty for non-iterable ranges) */
  // a stack, filled using `memo.tail.push(number)` (while memo itself is filled using `memo.unshift(number)`)
  tail: number[];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Change: minor[Issue / PR] describes a non-breaking change, such as adding a new functionalityDomain: main[Issue / PR] describes change in the functionality, its optimizationPending: blocked[Issue / PR] cannot be addressed until another issue is resolvedPriority: low[Issue / PR] could be addressed at any convenient timeType: improvement[Issue / PR] addresses lack of a functionality or an open possibility of enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions