Hacker News new | past | comments | ask | show | jobs | submit login

I got access to Copilot technical preview earlier today, here's the completion you wanted to try:

    // Computes the index of them item.
    map_index(int item, int *array, int size)
    {
     int i;
     for (i = 0; i < size; i++)
     {
      if (array[i] == item)
      {
       return i;
      }
     }
     return -1;
    }



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: