typo
Unarynot needed as it can be replaced by sapply.