This is super weird to me, why not return the function directly instead of wrapping it in an object with the `getQueuePosNr` as a field?