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

More flexible lowerBound interface #7344

Merged
merged 1 commit into from
Mar 16, 2018
Merged

Conversation

yglukhov
Copy link
Member

This allows to find lower bound of objects by their attribute. E.g.:

type Foo = object
  name: string
var s: seq[Foo]
echo lowerBound(s, "hello") do(a: Foo, b: string) -> int:
  cmp(a.name, b)

Otherwise a pseudo key of Foo has to be created.

@Araq Araq merged commit 5ea80b4 into nim-lang:devel Mar 16, 2018
@yglukhov yglukhov deleted the lower-bound branch March 16, 2018 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants