Rosetta Code:Village Pump/Suggest a programming task: Difference between revisions

m
→‎Unsorted: Java 7 isn't out yet, but Iterator.remove() is already there. Let's not get non-standard if we don't have to.
(→‎Unsorted: delete-if-not filter! Array#select!)
m (→‎Unsorted: Java 7 isn't out yet, but Iterator.remove() is already there. Let's not get non-standard if we don't have to.)
Line 289:
:This is an Anti-pattern. Why code it? --[[User:Paddy3118|Paddy3118]] 19:57, 5 April 2011 (UTC)
:: Perhaps the original commenter overspecified. Make it less specific? Call it [[Set filter]]. --[[User:Short Circuit|Michael Mol]] 20:16, 5 April 2011 (UTC)
::: Some languages provide this operation, exactly as the original commenter specified. Common Lisp has ''delete-if-not'', Factor has ''filter!'', and Ruby has ''Array#select!''. Java hackers might implement this with [http://download.javaoracle.netcom/javase/jdk76/docs/api/java/util/Iterator.html#remove() java.util.Iterator.remove()] from [http://download.javaoracle.netcom/javase/jdk76/docs/api/ Java API]. I added this task as an option to [[Filter]], along with code for Factor and Ruby. (The page already had Common Lisp.) --[[User:Kernigh|Kernigh]] 01:55, 6 April 2011 (UTC)
 
==Insufficient information==
Anonymous user