Generalized unimodal functions