logo       
Google Custom Search
    AddThis Social Bookmark Button

Nice/stdlib/nice/lang collections.nice,1.57,1.58: msg#00123

Subject: Nice/stdlib/nice/lang collections.nice,1.57,1.58
Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv8382/F:/nice/stdlib/nice/lang

Modified Files:
        collections.nice 
Log Message:
Added foreach on Maps.

Index: collections.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** collections.nice    19 Nov 2003 16:04:46 -0000      1.57
--- collections.nice    16 Dec 2003 14:55:28 -0000      1.58
***************
*** 467,468 ****
--- 467,478 ----
    return res;
  }
+ 
+ /****************************************************************
+  * Map operations
+  ****************************************************************/
+ 
+ <K,V> void foreach(Map<K,V> map, (K,V)->void fun)
+ {
+   for (Map.Entry<K,V> entry : map.entrySet())
+     fun(entry.getKey(), entry.getValue());
+ }




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>