Peak Detection by murky-satyr

(C:=Set evaluate:'#(',stdin contents,')')doWithIndex:[:x :i|stdout<<x<<([(C copyFrom:1to:-1+i)reverse detect:(B:=[:j|j<x or:0.x-j>9]).(C copyFrom:1+i)detect: B.'*
']ifError:[$
])]!

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top