gi: map foreach to each