Is there a faster way to test for membership in an Internal`Bag other than unpacking the whole thing like this?

MemberQ[Internal`BagPart[b, All], elem]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.