racket / data

Other
16 stars 23 forks source link

`except/e` Contract Errors when passed > 10 args #13

Closed maxsnew closed 6 years ago

maxsnew commented 6 years ago

The contract ofexcept/e special cases to just use or/e when 10 or fewer arguments are passed, but when 10 or more are passed it tries to do something smart with hashing, but it doesn't seem to work correctly.

So for instance if I remove 10 elements from an enum it works fine:

> (enum->list (apply except/e (below/e 100) (enum->list (below/e 10))))
...

But if I try to remove 11 at once I get an error:

> (from-nat (apply except/e (below/e 100) (enum->list (below/e 11))) 0)
hash-ref: no value found for key
  key: #f
rfindler commented 6 years ago

Looks like this was fixed in in October of 2016?

https://github.com/racket/data/commit/29d8c99b786ad5a95676325f41456a7f18648213

maxsnew commented 6 years ago

Oh lol I really ought to update

rfindler commented 6 years ago

:)

On Mon, Oct 8, 2018 at 10:35 AM Max S. New notifications@github.com wrote:

Oh lol I really ought to update

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/racket/data/issues/13#issuecomment-427880754, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYWsJ5hJZECmuElXdq-8tvEJhKrjpDHks5ui3CygaJpZM4XNGUo .