When I lived and worked in New York and visited beaches along the north shore of Long Island in the summer, the sheltered areas of the beachfront were dotted with the yellow blossoms of the prickly pear cactus.
You normally associate cacti with deserts, but the sandy dry soils beyond the reach of high tides is the perfect place for this cactus to thrive. Its stems act like leaves. It is able to store water that it absorbs during rains. It has an anti-freeze like chemicals that prevents it from the freezing winter temperatures.
I once learned how this species protects itself when I knelt down to take a picture of the plant and accidentally brushed against a cactus I did not see. Its pads are covered in small barb-like thorns. It was painful and irritating and I learned to look all around before taking another photograph.
This is a cactus that grows in the eastern half of the U.S. It has many other species in the same genus that grow in the deserts of the western U.S. Its fruit is edible and although I have never tried it, I understand that it tastes a bit like watermelon.