sort_dict.pl -- Sorts list of dicts by key
Sorts list of dicts by key.
- sort_dict(+Key, +Direction, +List, -Sorted) is det
- Sorts the list of dicts in the given direction.
Direction is either
asc
or desc
. Sorting is done by
predsort/3. Throws error(invalid_direction(Direction))
when the Direction is neither asc
or desc
.
- sort_dict(+Key, +List, -Sorted) is det
- Does same as sort_dict/4 but uses
asc
as
the default sorting direction.