Learning the letter of the law