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

But the need is obviously there. Everyone who produces the following code in a non-university environment - for a fee! - needs to be punished quickly and severely:

Based on the given prompt, [Codex] produced the following response:

     function isEven(n) {

       if (n == 0)

         return true;

       else if (n == 1)

         return false;

       else if (n < 0)

         return isEven(‐n);

       else

         return isEven(n ‐ 2);

     }

     console.log(isEven(50));

     // → true

     console.log(isEven(75));

     // → false

     console.log(isEven(‐1));

     // → ??**



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

Search: