bimap
bimap copied to clipboard
Make Bimap return Sets when appropriate
It would be nice if keys and keysR returned Set a instead of [a] by using the Data.Map.keysSet function. Set's are often preferable and this conversion would have a smaller constant factor than Set.fromListAsc . toMap. Plus there's always elems for getting the [a] type.
I would rather have new functions Bimap.keysSet and Bimap.keysSetR so that we can maintain backward compatibility and keep matching the interface of Prelude's Maps