Lenses and indexed state