non-linear-pattern-error submitted again
added local type declaration after (%if (typep ...)