<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 28, 2014 at 2:25 PM,  <span dir="ltr"><<a href="mailto:wolfgang@exist-db.org" target="_blank">wolfgang@exist-db.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span class="">I won't say too much more about this as I have been discussing it with<br>Wolfgang this morning, and I think he will shortly post you a very<br></span>fast example when using XQuery 3.1 Maps in eXist…</div></blockquote><div><br></div>Well, Michael already posted something along those lines, but here’s my solution based on the public 3.1 draft:</div><div><br></div><div><div><div>xquery version "3.0";</div><div><br></div><div>let $a := 1 to 1000000</div><div>let $b := map:new((1 to 100) ! map:entry(xs:int(util:random() * 100000), 0))</div><div>return</div><div>    $a[map:contains($b, .)]</div></div><span class=""><font color="#888888"><div><br></div><div>Wolfgang</div></font></span></div></div></blockquote></div><br></div><div class="gmail_extra">Would this not be $a[not(map:contains($b, .))] since I want the ones for which there is no matching sequence B.</div></div>