Mimosa pudica - sleeping grass

Nov 2017
I remember these plants being in my yard when I lived on Oahu & if I recall correctly they also have thorns:

I don't know what the purpose of closing up its leaves serves; it's not a carnivorous plant like a Venus fly trap, as far as I'm aware & almost no other plants in existence possess such rapid movement capabilities.