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
My personal opinion is "It is not worth it". The API is wide enough as it is and I believe the speed difference between two calls lookup+insert and lookup+maybe insert is not so big.
Would it make sense to add this?
Analog to
insertLookupWithKey
from Data.Map, saving one traversal.insertLookup :: Ord a => a -> Set a -> (Bool, Set a)
or
insertLookup :: Ord a => a -> Set a -> Maybe (Set a)
The text was updated successfully, but these errors were encountered: