findM package:containers

The maximal key of the map. Calls error if the map is empty.
The minimal key of the map. Calls error if the map is empty.
The maximal element of the set. Calls error if the set is empty.
The minimal element of the set. Calls error if the set is empty.
The maximal key of the map. Calls error if the map is empty.
findMax (fromList [(5,"a"), (3,"b")]) == (5,"a")
findMax empty                            Error: empty map has no maximal element
The minimal key of the map. Calls error if the map is empty.
findMin (fromList [(5,"a"), (3,"b")]) == (3,"b")
findMin empty                            Error: empty map has no minimal element
The maximal element of the set. Calls error if the set is empty.
The minimal element of the set. Calls error if the set is empty.
Delete and find the maximal element. This function throws an error if the map is empty. Use maxViewWithKey if the map may be empty.
Delete and find the minimal element. This function throws an error if the map is empty. Use minViewWithKey if the map may be empty.
Delete and find the maximal element.
deleteFindMax set = (findMax set, deleteMax set)
Delete and find the minimal element.
deleteFindMin set = (findMin set, deleteMin set)
Delete and find the maximal element.
deleteFindMax (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((10,"c"), fromList [(3,"b"), (5,"a")])
deleteFindMax empty                                      Error: can not return the maximal element of an empty map
Delete and find the minimal element.
deleteFindMin (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((3,"b"), fromList[(5,"a"), (10,"c")])
deleteFindMin empty                                      Error: can not return the minimal element of an empty map
Delete and find the maximal element.
deleteFindMax set = (findMax set, deleteMax set)
Delete and find the minimal element.
deleteFindMin set = (findMin set, deleteMin set)