mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
add ListIsUnique lowlevel operation
This commit is contained in:
parent
fcfe66f84d
commit
5755475b3a
9 changed files with 29 additions and 0 deletions
|
@ -1355,3 +1355,9 @@ pub fn listFindUnsafe(
|
|||
return .{ .value = null, .found = false };
|
||||
}
|
||||
}
|
||||
|
||||
pub fn listIsUnique(
|
||||
list: RocList,
|
||||
) callconv(.C) bool {
|
||||
return list.isEmpty() or list.isUnique();
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ comptime {
|
|||
exportListFn(list.listAny, "any");
|
||||
exportListFn(list.listAll, "all");
|
||||
exportListFn(list.listFindUnsafe, "find_unsafe");
|
||||
exportListFn(list.listIsUnique, "is_unique");
|
||||
}
|
||||
|
||||
// Dict Module
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue