It happens to all of us. Whether you're a beginner or an expert in composing, one day the inevitable occurs. You create a nice chess problem and are proud of your work — but you are not the first who comes up with that brilliant idea, someone else was quicker.
Just a few days ago, when looking around for some humorous chess problems, I saw the famous "caterpillar" (diagram A). This term can be traced back to
Tim Krabbé who wrote a whole article about it. Unfortunately, I couldn't find it in the archives of
www.chesscafe.com. Anyway, I immediately recalled that in the early 1980s, as a result of some composing, I had the very same position on my chessboard. I had been totally unaware of it for quite some time until I learned about the predecessor.
A similar experience, not much later than the previous one, is connected to diagram B. I had sent in a
Selfmate which was cooked by
Alybadix. After some attempts, Dr. Ulrich Auhagen managed to find a correct version and, in 1985, this coproduction became my first published chess problem. But ... it was almost identical to Pauly's composition, just without the two pawns on the cfile and thus demanding two solutions. Therefore, it was undoubtedly anticipated and our diagram can only be accepted as a version of his.
A  William A. Shinkman 
1887 

#8  (8+1) 

B  Wolfgang Pauly 
Eskilstuna Kuriren, 1920 

s#9  (6+3) 

Solutions:
A  1. 000! Kxa7 2. Rd8 Kxa6 3. Rd7 Kxa5 4. Rd6 Kxa4 5. Rd5 Kxa3 6. Rd4 Kxa2 7. Rd3 Ka1 8. Ra3#
but 1. Kd2! also solves. 
B  1. e3! Kd1 2. e4 Kc1 3. e5 Kd1 4. e6 Kc1 5. e7 Kd1 6. e8=N Kc1 7. Nd6 Kd1 8. Nc4 Kc1 9. Nb2 axb2#
If you take away the pawns on c5 and c6, you get this additional solution: 1. e4! Kd1 2. e5 Kc1 3. e6 Kd1 4. e7 Kc1 5. e8=R Kd1 6. Re2 Kc1 7. Nb5 Kd1 8. Nc3+ Kc1 9. Rb2 axb2# 
There are some more recent examples of anticipation in which I have been involved. I'll write about them in another post.