Contrasting ideas is a form of parallelism in which ideas are compared against each other to demonstrate a contrast. This can take the simple form A-B-A-B or can be more complex.
One example among dozens in the Book of Mormon is found in Alma 5:16–17:
A. can you imagine to yourselves
B. that ye hear the voice of the Lord,
C. saying unto you, in that day:
D. Come unto me ye blessed, for behold, your works have been the works of righteousness
E. upon the face of the earth?
A. Or do ye imagine to yourselves
B. that ye can lie unto the Lord
C. in that day, and say Lord
D. our works have been righteous works
E. upon the face of the earth—and that he will save you?
Where did Joseph Smith learn so many different types of parallelism?