import module namespace
math="http://www.zorba-xquery.com/modules/math";

math:rank(3.5, (7, 3.5, 3.5, 1, 2), fn:true() )


(:

Expected output:

<?xml version="1.0" encoding="UTF-8"?>
3


:)