Groups of repeating items Challenge description
Given a list / array of items, display all groups of consecutive repeating items.
Input / output description
Your input is a list / array of items (you can assume all of them are of the same type). You don't need to support every type your language has, but is has to support at least one (preferably int, but types like boolean, although not very interesting, are also fine). Sample outputs:
[4, 4, 2, 2, 9, 9] -&gt; [[4, 4], [2, 2], [9, 9]]
[1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4] -&gt; [[1, 1, 1], [2, 2], [3, 3, 3], [4, 4, 4, 4]]
[1, 1, 1, 3, 3, 1, 1, 2, 2, 2, 1, 1, 3] -&gt; [[1, 1, 1], [3, 3], [1, 1], [2, 2, 2], [1, 1], [3]]
[9, 7, 8, 6, 5] -&gt; [[9], [7], [8], [6], [5]]
[5, 5, 5] -&gt; [[5, 5, 5]]
['A', 'B', 'B', 'B', 'C', 'D', 'X', 'Y', 'Y', 'Z'] -&gt; [['A'], ['B', 'B', 'B'], ['C'], ['D'], ['X'], ['Y', 'Y'], ['Z']]
[True, True, True, False, False, True, False, False, True, True, True] -&gt; [[True, True, True], [False, False], [True], [False, False], [True, True, True]]
[0] -&gt; [[0]]

As for empty lists, output is undefined - it can be nothing, an empty list, or an exception - whatever suits your golfing purposes the best. You don't have to create a separate list of lists either, so this is a perfectly valid output as well:
[1, 1, 1, 2, 2, 3, 3, 3, 4, 9] -&gt;

1 1 1
2 2
3 3 3
4
9

The important thing is to keep the groups separated in some way. This is code-golf so the shortest code in bytes wins
Mathematica, 5 bytes

Split


... there's a built-in for that.