Q: how do I pop an arbitrary element from a list?
Given the list '(a b c d e)
, pop
returns a
and destructively
modifies the list to '(b c d e)
. How can I generalize this
function so I could pop an arbitrary element (say, c
)?
I'm almost sure I've seen this in a library somewhere, but can't remember where.