Literally, “I turned myself and mine heart to.” A phrase peculiar to Ecclesiastes, and appropriate to the penitent turning back to commune with his heart on his past life.
wickedness of folly - He is now a step further on the path of penitence than in Ecc 1:17; Ecc 2:12, where “folly” is put without “wickedness” prefixed.
reason - rather, “the right estimation” of things. Holden translates also “foolishness (that is, sinful folly, answering to ‘wickedness’ in the parallel) of madness” (that is, of man’s mad pursuits).