flatmap_with_each