vstd: add specification to Vec::retain#2265
Conversation
|
This one took me a while to work through, but I think there are two challenges that make Second, the idiom we usually use with So you may have to use something like: if you want to use some sort of Seq filter function to calculate the new vec. |
|
Oof, that is a great point. I wonder if it's worth it to specify it as is or whether we should find a better way to convert (deterministic) exec functions into spec functions. I presume all the work on the iterators would also want to enable the combinators that depend on closures? @parno what do you think? |
|
I think it would be really great to have like an |
Yes, at the moment, there's a complicated implementation for such combinators based on prophetic sequences (see the prototype), but if we knew the closures were pure, we could potentially have a simpler "happy case" for those instances. |
6ae12cd to
2c1abfe
Compare
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.