Vivipary is when a seed germinates while it is still on the parent plant. When this happens, the seeds may produce roots and shoots while still in a fruit, as occasionally happens in citrus or squash. Generally this is detrimental to the plant as the seedlings usually die. However sometimes it is beneficial to the plant; mangrove seeds begin germinating before they fall off of the parent plant; this is so that when they do fall their pointy root will become embedded in the mud where it lands, keeping the seed from being swept out to sea.