"In computer programs, concerns for efficiency may limit the possible ways to achieve a particular function, making a particular expression necessary to achieving the idea. In this case, the expression is not protected by copyright."
https://en.wikipedia.org/wiki/Abstraction-Filtration-Compari...
Think about how absurd this is. So if Microsoft was the first company to write and publish an isEven function then no one else can legally use it?