Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend memo interface #67

Open
parzhitsky opened this issue May 31, 2020 · 0 comments
Open

Extend memo interface #67

parzhitsky opened this issue May 31, 2020 · 0 comments
Labels
Change: minor [Issue / PR] describes a non-breaking change, such as adding a new functionality Domain: main [Issue / PR] describes change in the functionality, its optimization Pending: blocked [Issue / PR] cannot be addressed until another issue is resolved Priority: low [Issue / PR] could be addressed at any convenient time Type: improvement [Issue / PR] addresses lack of a functionality or an open possibility of enhancement

Comments

@parzhitsky
Copy link
Member

parzhitsky commented May 31, 2020

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[];
}
@parzhitsky parzhitsky added Change: minor [Issue / PR] describes a non-breaking change, such as adding a new functionality Domain: main [Issue / PR] describes change in the functionality, its optimization Pending: blocked [Issue / PR] cannot be addressed until another issue is resolved Priority: low [Issue / PR] could be addressed at any convenient time Type: improvement [Issue / PR] addresses lack of a functionality or an open possibility of enhancement labels May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Change: minor [Issue / PR] describes a non-breaking change, such as adding a new functionality Domain: main [Issue / PR] describes change in the functionality, its optimization Pending: blocked [Issue / PR] cannot be addressed until another issue is resolved Priority: low [Issue / PR] could be addressed at any convenient time Type: improvement [Issue / PR] addresses lack of a functionality or an open possibility of enhancement
Projects
None yet
Development

No branches or pull requests

1 participant