change the return type from the indexed adaptor so that the index is available from the range element.