allUnique
lib.allUnique
Docs pulled from | This Revision | 43 minutes ago
Check if list contains only unique elements. O(n^2) complexity.
Inputs
list
-
1. Function argument
Type
allUnique :: [a] -> bool
Examples
lib.lists.allUnique
usage example
allUnique [ 3 2 3 4 ]
=> false
allUnique [ 3 2 4 1 ]
=> true
Noogle detected
Implementation
The following is the current implementation of this function.
allUnique = list: (length (unique list) == length list);