On Mon, Feb 4, 2008 at 7:56 PM, Neil Mitchell <[EMAIL PROTECTED]> wrote: > A few design differences from your one: > > * I called my module BiMap" rather than "Bimap" - I debated this with > a collegue, and we settled on the capital M, but it was a very close > call.
Mine was also originally BiMap, but I thought the capital M looked a little ugly, so I changed it. > * I have no L/R and Either variants. I decided it was better to be a > superset of Data.Map, and then have lookupRev/memberRev functions for > the R versions. Do you think anyone is likely to use the Either > variant, without a constant Left or Right in the code? Is this an > artefact of how its easier to code, rather than to use? I initially had only the Either variants, because that was easier to code, and I thought it would make the interface cleaner. Then when I started writing tests, I realised that this was a pain, and I went back and added the L/R variants. I never bothered to remove the Either variants, because the L/R versions are (currently) implemented in terms of them anyway. I was thinking of having another module, Data.Bimap.Asymmetric, that would expose an interface more like that of Data.Map (i.e. biased towards treating the left type as the key), but I decided it was better to get the first release out as soon as possible. Thanks for the feedback, Stuart _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
