[Prev][Next][Index][Thread]
Removing a specific item from a collection?
-
To: info-dylan@ai.mit.edu
-
Subject: Removing a specific item from a collection?
-
From: Dustin Voss <d_voss@uswest.net>
-
Date: Tue, 2 May 2000 13:30:03 -0400 (EDT)
-
User-Agent: MT-NewsWatcher/3.0 (PPC)
-
Xref: traf.lcs.mit.edu comp.lang.dylan:11946
I was surprised to find that there doesn't seem to be a way to remove,
say, element 5 from a stretchy-vector. Explicit key collections (i.e.
<table>) have the remove-key (or is it remove-element) function, but
there doesn't seem to be an analogous function for the other collections.
The remove function deletes by value, not index. If you have 3
duplicate values, and you want to remove the middle one, it looks like
you are out of luck.
This must have come up before; how did you solve it? Can we add such a
function to the standard?
Follow-Ups: