Loop in matrix in a function

I have a function(data, xnames, wnames,……). In the parameters of this function, data is a matrix(100×5). When I apply this function, I want to get such a loop: Each matrix in the data has one more row than the previous matrix, loop 100 times like this. In other words, I have to run this function 100 times. So I want to use a loop to achieve it.

See ?lapply and then you should be able to adapt what I wrote in your previous question question, eg lapply(data, function)