Electric eels are clever sods. Horizontal strands of nervous tissue set up a situation where the head becomes positive, the tail negative, and a potential difference of hundreds of volts in between. A recent paper in Current Biology (cf http://news.sciencemag.org/plants-animals/2015/10/electric-eels-curl-double-their-voltage) shows that, when their victim struggles, the eels curl round so that the head becomes closer to the tail, increasing the field strength in between and delivering the final, fatal zap.
Perhaps this is an innate behaviour that has evolved though history. But eels can be much more calculating. A friend of mine once ran a laboratory where he was studying sodium channels, which are key components of our nervous system and which occur in abundance in the tails of electric eels. Every so often a laboratory assistant had the job of anaesthetizing the eels and cutting a section of tail off. The eels suffered no harm, but their tails gradually became shorter and shorter.
Various assistants had the job of feeding the eels, being careful to drop the morsels from height and not put their hands in the water. One eel developed a technique of vigorously spraying the water so as to establish an electrical pathway, along which it would send a belt of electricity that threw the poor assistant backwards. It only did this to the assistant who had the job of slicing of its tail segments; others who fed it remained untouched.
Yes, electric eels are clever sods – and vengeful with it.