Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Perl
do_something($_) for @items;

This performs a single operation on each element
for my $x (@items) {
     do_something($x);
     more_stuffs($x);
}

This construct is best for multiple operations on $x
for Item of Items loop
   Do_Something (Item);
end loop;

New implementation...