23 lines
1,014 B
C
23 lines
1,014 B
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_foreach.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2016/08/12 12:28:09 by jhalford #+# #+# */
|
|
/* Updated: 2016/08/13 16:21:58 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
void ft_foreach(int *tab, int length, void (*f)(int))
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (i < length)
|
|
{
|
|
f(tab[i]);
|
|
i++;
|
|
}
|
|
}
|