deps/kb_meme/meme-5.0.1/src/array-list.c
/*
 * arraylst_map
 * Applies a function to each item of the array list and updates it to what 
 * was returned.
 */
arraylst_map
Applies a function to each item of the array list and updates it to what
was returned.
arraylst_map Applies a function to each item of the array list and updates it to what was returned .
void arraylst_map(void* (*map_fun)(void*), ARRAYLST_T *arraylst) {
  int i;
  if (arraylst == NULL)                       die("arraylst_map: arraylst is NULL!\n"); 
  if (map_fun == NULL)                        die("arraylst_map: map_fun is NULL!\n");
  for (i = 0; i < arraylst->size; ++i) {
    arraylst->array[i] = map_fun(arraylst->array[i]);
  }
}
void arraylst_map ( void * ( * map_fun ) ( void * ) , ARRAYLST_T * arraylst ) { int i ; if ( arraylst == NULL ) die ( " \n " ) ; if ( map_fun == NULL ) die ( " \n " ) ; for ( i = 0 ; i < arraylst -> size ; ++ i ) { arraylst -> array [ i ] = map_fun ( arraylst -> array [ i ] ) ; } }
arraylst_map
 Applies a function to each item of the array list and updates it to what
 was returned.
arraylst_map Applies a function to each item of the array list and updates it to what was returned .