Proverbs 21:11 Midrash

בַּעְנָשׁ־לֵ֭ץ יֶחְכַּם־פֶּ֑תִי וּבְהַשְׂכִּ֥יל לְ֝חָכָ֗ם יִקַּח־דָּֽעַת׃

When the scorner is punished, the thoughtless is made wise; And when the wise is instructed, he receiveth knowledge.

Read midrashic interpretation of Proverbs 21:11: and classical rabbinic exegesis.