sapp: Apply a terra function that takes only a single layer to all layers
Description
Apply to all layers of a SpatRaster a function that only takes a single layer SpatRaster (these are rare).
in most cases you can also use lapply or sapply for this.