Related Posts

How to create a list that holds different object types using `void*` in C.
I remember being in school back around 1998 and not knowing enough about C to do this. After coding in other languages, then going back to C++ and understanding at a lower level how references and pointers work, this was pretty easy to figure out. In this exercise I store elements of different types in […]
Hoy 18 de Enero, Overview of Mustang Features (Java 6) en las nuevas oficinas de Google, NY
Hoy a las 6pm voy a la reunion del Java SIG (El grupo de usuarios de Java de New York), que tomara lugar en las nuevas oficinas de Google en Chelsea, wohoo. La exposicion de las nuevas caracteristicas de Java 6, code name “Mustang”, va a ser dictada por La Ingeniera del Staff de Sun […]
#SCALA #NOTES Difference between list.foreach() and list.map()
[scala]val l = List(1,2,3,4,5) val lAfterForEach = l.foreach(x => x * 10) val lAfterMap = l.map(x => x * 10) println(“Original List: ” + l) println(“For each operates on each element, returns nothing:” + lAfterForEach) println(“Map is like foreach but returns new post-processed list: ” + lAfterMap)[/scala] output: [bash]Original List: List(1, 2, 3, 4, 5) […]