Could `Sequential` satisfy `SearchableList` ?
See original GitHub issueI was experimenting with the in
operator and "Hello" in "Hello world"
lead me to try
print([1,2] in [0,1,2,3]);
which gave a warning “Tests containment with disjoint element types: ‘Integer[2]’ and ‘Integer’ are disjoint” and printed out false
.
So after investigating, I found that SearchableList
is involved in the substring search and wondered why Sequential
couldn’t also support the same behaviour:
Encouraged by @jvasileff I reposted my question here.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
What are 3 conditions under which the sequential search of a ...
The list must be in sorted order. Any random element can be accessed in constant time. With linked list the second prerequisite is...
Read more >Why is sequential search of ordered list slower than search of ...
I have got assignment to implement set class with linked list, so I first made it with unordered list and time needed to...
Read more >Sequential search leads to faster, more efficient fragment ...
We have investigated whether a pseudo-greedy search approach, which begins sequentially from one of the termini, can improve the performance and accuracy of...
Read more >Consumer Sequential Search: Not Enough or Too Much? - JStor
We study sequential search behavior in a generalized "secretary problem" in which a single object is to be selected from a set of...
Read more >Sequential Search with Refinement: Model and Application ...
in the data, a consumer's decision to stop the search can be ... identification and estimation strategy of a sequential search model that ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One reason not to is that “their elements and their sublists” aren’t necessarily disjoint. There would be two occurrences of
[1, 2]
in[1, 2, [1, 2]]
, which seems confusing.I don’t see any particularly strong reason why
Sequential
couldn’t inheritSearchableList<Anything>
.OTOH, I rarely use these operations, except on
String
s, and they are actually somewhat heavy to implement.