Solve the programming task below in a Python markdown code block.
An element in an array is dominant if it is greater than all elements to its right. You will be given an array and your task will be to return a list of all dominant elements. For example:
```Haskell
solve([1,21,4,7,5]) = [21,7,5] because 21, 7 and 5 are greater than elments to their right. 
solve([5,4,3,2,1]) = [5,4,3,2,1]

Notice that the last element is always included.
```

More examples in the test cases.

Good luck!
Also feel free to reuse/extend the following starter code:
```python
def solve(arr):
```