22 lines
1,008 B
C
22 lines
1,008 B
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_foreach.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2016/11/07 16:24:51 by gtertysh #+# #+# */
|
|
/* Updated: 2016/11/07 16:51:47 by gtertysh ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
void ft_foreach(int *tab, int length, void (*f)(int))
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (i < length)
|
|
{
|
|
f(tab[i++]);
|
|
}
|
|
}
|