Documentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
DA.List.BuiltinOrder
Note: This is only supported in Daml-LF 1.11 or later. This module provides variants of other standard library functions that are based on the builtin Daml-LF ordering rather than user-defined ordering. This is the same order also used byDA.Map.
These functions are usually much more efficient than their
Ord-based counterparts.
Note that the functions in this module still require Ord
constraints. This is purely to enforce that you don’t
pass in values that cannot be compared, e.g., functions. The
implementation of those instances is not used.
Module Snapshot
Lifecycle
Stable.
Notices
Status:
active
Introduced in: 3.4.9
Removed in: -
Warnings: 0
Deprecations: 0
Deprecated since: -Functions
dedup
dedup l removes duplicate elements from a list. In particular,
it keeps only the first occurrence of each element.
dedup is stable so the elements in the output are ordered
by their first occurrence in the input. If you do not need
stability, consider using dedupSort which is more efficient.
dedupOn
dedup where deduplication is done
after applying the given function. Example use: dedupOn (.employeeNo) employees.
dedupOn is stable so the elements in the output are ordered
by their first occurrence in the input. If you do not need
stability, consider using dedupOnSort which is more efficient.
dedupSort
dedupSort is a more efficient variant of dedup
that does not preserve the order of the input elements.
Instead the output will be sorted acoording to the builtin Daml-LF
ordering.
dedupOnSort
dedupOnSort is a more efficient variant of dedupOn
that does not preserve the order of the input elements.
Instead the output will be sorted on the values returned by the function.
For duplicates, the first element in the list will be included in the output.
sort
sortOn
sortOn f is a version of sort that allows sorting
on the result of the given function.
sortOn is stable so elements that map to the same sort key
will be ordered by their position in the input.