DeleteAdjacentDuplicates
DeleteAdjacentDuplicates[list]
删除 list 中相同元素的所有重复项.
DeleteAdjacentDuplicates[list,test]
对成对的连续元素应用 test 以确定它们是否应被视为重复元素.
更多信息
- DeleteAdjacentDuplicates[list] 删除 list 中出现的的所有相同元素,但第一次出现的元素除外.
- DeleteAdjacentDuplicates 也适用于关联关系.
- DeleteAdjacentDuplicates 从不重新排序元素,而只会删除它们.
- DeleteAdjacentDuplicates[list] 等价于 DeleteAdjacentDuplicates[list,SameQ].
范例
打开所有单元关闭所有单元基本范例 (3)
范围 (2)
属性和关系 (2)
Wolfram Research (2022),DeleteAdjacentDuplicates,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DeleteAdjacentDuplicates.html.
文本
Wolfram Research (2022),DeleteAdjacentDuplicates,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DeleteAdjacentDuplicates.html.
CMS
Wolfram 语言. 2022. "DeleteAdjacentDuplicates." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/DeleteAdjacentDuplicates.html.
APA
Wolfram 语言. (2022). DeleteAdjacentDuplicates. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/DeleteAdjacentDuplicates.html 年