If you cut off a tapeworm's head, it loses its main ganglia [~brain]; but when the head/ganglia grow back, the tapeworm will still have environmental memories (e.g. how to solve a maze it had mastered, pre-decapitation).
[1] https://www.amazon.com/Entangled-Life-Worlds-Change-Futures/...
"Entangled Life: How Fungi Make Our Worlds, Change Our Minds & Shape Our Futures" by Merlin Sheldrake https://www.amazon.com/Entangled-Life-Worlds-Change-Futures/...
I'm happy to pass along that recommendation. I had no idea that fungi were so interesting.
The book takes some detours into panspermia theory that I found a little boring. There was also some pacing issues in many places. However, the interesting part about fungal life was so good that I would still recommend it.
[1]: https://www.amazon.com/Entangled-Life-Worlds-Change-Futures/...