(Devarim 18:9) "When you come to the land": Perform the mitzvah stated herein, in whose reward you will enter the land.
"that the L-rd your G-d gives to you": in your merit.
"you shall not learn to do as the abominations of those nations": I might think that you are forbidden to understand and teach (the falsity of their ways); it is, therefore, written "to do." You may not learn them to do them, but you may learn them to each and to understand.