In Sweden in the 1960's and 70's there was a law that if a criminal was "unfit" of committing his crime, he should not be punished. That meant that if, for example, an arsonist was too dumb to put something on fire in an effective way, the charges were dropped.