It's useful to have this code being shared, but having a factory for a single function is pretty verbose. Maybe call the factory `'queuePositions'` and return an object with stuff you can do with queue positions?