Simplify "is_unary" check in `memoize` and check for "is_unary" first in `memof`.