【发布时间】:2022-10-02 03:46:14
【问题描述】:
例如,我有一个 [A,A,A,B,B,B,A,A,C,C] 列表,我想将其转换为:
[
[A,A,A],
[B,B,B],
[A,A], // repeated type. but since this \"group\" is not adjacent to the first one, so it is in its own group
[C,C],
]
这对 lodash 可行吗?
标签: javascript lodash