You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function should work similarly to fromList but will return an Ok if all of the keys are distinct and an Error containing the duplicated key if it is encountered.
Naming suggestions would be helpful.
The text was updated successfully, but these errors were encountered:
I think there's a slight misunderstanding as to the intent of this. As you process the list, you should be adding the keys/values to a Map, not making another list.
The Ok is intended to be a ('key, 'value, 'comparator) Map.t with the key/values from the list in it. The Error case just has the key.
This function should work similarly to
fromList
but will return anOk
if all of the keys are distinct and anError
containing the duplicated key if it is encountered.Naming suggestions would be helpful.
The text was updated successfully, but these errors were encountered: