Generalized convexity