A prune function for keeping only the mixed accepted steps