The very interesting thing is that the catapillar’s experiences, on some level, are maintained into the butterfly stage—despite so much of the larva being dissolved!
https://www.newscientist.com/article/dn13412-butterflies-rem...
https://www.newscientist.com/article/dn13412-butterflies-rem...
Here was a followup direct to a study with details and moths. https://journals.plos.org/plosone/article?id=10.1371/journal...