Try to pop first occurrence of needle in haystack (if any).
Remove element at index index in r.
See Source File