Mappings and structs for Solidity

Erm, actually *not*. The next line (which you did not cite) is `return index` :-)