Cumulative product?

What is the equivalent of cumsum for the product? For example, for the vector [2;2;2;5] I am looking for a function to get:

cumprod = [2;4;8;40]

It is called… cumprod

julia> cumprod([2, 2, 2, 5])
4-element Vector{Int64}:
  2
  4
  8
 40
2 Likes