Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Scala
items.foreach(doSomething)

when the method you're calling on each item in the collection only takes a single parameter, you can omit specifying it.
for {
  x <- items
} doSomething(x)
items.foreach{doSomething(_)}
for Item of Items loop
   Do_Something (Item);
end loop;

New implementation...