<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I would think both of these could be implemented as user-defined functions but it’s hard to know without seeing a specification: saying you want a function called array:index-of() is not very informative unless you explain exactly what you want the function to do.</div><div class=""><br class=""></div><div class="">If it’s to behave like fn:index-of() then you can write it as</div><div class=""><br class=""></div><div class=""><div class="">array:index-of($array, $value) {</div><div class="">   (1 to array:size($array))[ $array(.) = $value ]</div><div class="">}</div></div><div class=""><br class=""></div><div class="">which is hardly a great hardship to write as a user-defined function.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Michael Kay</div><div class="">Saxonica</div><br class=""><div><blockquote type="cite" class=""><div class="">On 26 Jun 2015, at 12:18, W.S. Hager <<a href="mailto:wshager@gmail.com" class="">wshager@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hello,<br class=""><br class=""></div>I've been working with the recent xquery 3.1 implementation in the develop branch eXist-db. I encountered some cases that were quite hard to work around:<div class=""><br class=""></div><div class="">- the lack of array:index-of()</div><div class="">- the lack of the iterator index in arrayfor-each and related higher-order functions</div><div class=""><div class=""><div class=""><br class=""></div><div class="">Perhaps someone of the workgroup is available to discuss those cases.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Wouter<br class="">-- <br class=""><div class=""><div class=""><p class=""> 
W.S. Hager<br class="">
Lagua Web Solutions<br class="">
<a href="http://lagua.nl/" target="_blank" class="">http://lagua.nl</a><br class=""></p></div></div>
</div></div></div></div>
<br class=""><br class="">-- <br class=""><div class=""><p class=""> 
W.S. Hager<br class="">
Lagua Web Solutions<br class="">
<a href="http://lagua.nl/" target="_blank" class="">http://lagua.nl</a><br class=""></p></div><br class="">
_______________________________________________<br class=""><a href="mailto:talk@x-query.com" class="">talk@x-query.com</a><br class="">http://x-query.com/mailman/listinfo/talk</div></blockquote></div><br class=""></body></html>