How to get list of repeating integers from array?
<p>what would be a simple way for finding and outputting a row of repeating integers in an array</p>

<p>For example, an array of <code>1 2 3 4 4 4 5 6</code> should output <code>4 4 4</code></p>