Groups the list into sub-lists when adjacent elements are satisfy pred.
pred
The condition to group.
The list of grouped sub-list.
Groups the list into sub-lists when adjacent elements are satisfy
pred.