Add pull function

Retrieving a value and its removal