The final line of the function echoes the variable @@. Remember that variables starting with an @ are registers. @@ is the "unnamed" register: the one that Vim places text into when you yank or delete without specify a particular register.
Pretty sure this isn't correct. The unnamed register is @". Not sure what you call @@ but it's like the "repeat last register" register.