May this challenge serve as (another) tribute to Stan Lee, who passed away aged 95.
Stan Lee has left us an invaluable legacy and a peculiar catch word: Excelsior. So here's a small challenge based on what he said it was its meaning:
Finally, what does “Excelsior” mean? “Upward and onward to greater glory!” That’s what I wish you whenever I finish tweeting! Excelsior!
Challenge
Given a series of non-negative integers, output a line with Excelsior!
every time an integer is greater than the previous one.
Rules
- Input will be an array of non-negative integers.
- Output will consist of lines with the word
Excelsior
(case does matter) followed by as many!
as the length of the current run of increasingly greater numbers. You can also return an array of strings. - Input and output formats are flexible according to the site rules, so feel free to adapt them to your language formats. You can also add spaces at the end of the lines, or even extra new lines after or before the text if you need.
Examples
Input Output
-----------------------------------
[3,2,1,0,5] Excelsior! // Excelsior because 5 > 0
[1,2,3,4,5] Excelsior! // Excelsior because 2 > 1
Excelsior!! // Excelsior because 3 > 2 (run length: 2)
Excelsior!!! // Excelsior because 4 > 3 (run length: 3)
Excelsior!!!! // Excelsior because 5 > 4 (run length: 4)
[] <Nothing>
[42] <Nothing>
[1,2,1,3,4,1,5] Excelsior! // Excelsior because 2 > 1
Excelsior! // Excelsior because 3 > 1
Excelsior!! // Excelsior because 4 > 3 (run length: 2)
Excelsior! // Excelsior because 5 > 1
[3,3,3,3,4,3] Excelsior! // Excelsior because 4 > 3
This is code-golf, so may the shortest code for each language win!