This isn't quite accurate... it returns 1 instead of 0.

Also I don't think we need the square brackets here.