Some species of fish are hermaphrodites functioning as both male and female in sexual reproduction by producing both sperm and eggs.