he-009
1.000
Proposed solution
```python
from typing import List
def rolling_max(numbers: List[int]) -> List[int]:
""" From a given list of integers, generate a list of rolling maximum element found until given moment
in the sequence.
>>> rolling_max([1, 2, 3, 2, 3, 4, 2])
[1, 2, 3, 3, 3, 4, 4]
"""
if not numbers:
return []
max_so_far = numbers[0]
result = [max_so_far]
for num in numbers[1:]:
max_so_far = max(max_so_far, num)
result.append(max_so_far)
return result
```Test output (stdout)
. [100%] 1 passed in 0.01s
System prompt
You are an expert programmer. Solve the task exactly as specified. Output your solution as fenced code blocks using the required file name(s) and the exact function/type signatures requested. Prefer correctness; do not include prose outside code unless asked.