Re: [containers-users] Request for comments on BiMap

2018-02-27 Thread SP
Made progress with enriching the module's interface and done some basic testing. https://github.com/c-cube/ocaml-containers/compare/master...orbifx:bimap It's missing sequence conversions, which I need to read about before I can implement them. Anything else? -- SP _

Re: [containers-users] Request for comments on BiMap

2018-02-24 Thread Simon Cruanes
Le Sat, 24 Feb 2018, Drup wrote: > Why not call this "Bijection" or "BijMap" ? BiMap simply implies two maps. > This a bit more specific. It makes sense! `Bijection` is about the intent, `BiMap` ties to an implementation. However if we change the name we still have to convey that it's a functional

Re: [containers-users] Request for comments on BiMap

2018-02-24 Thread SP
On Sat, Feb 24, 2018 at 01:01:45PM +0100, Drup wrote: Why not call this "Bijection" or "BijMap" ? BiMap simply implies two maps. This a bit more specific. With BiMap I was hoping to do a catch-all for Two-maps, bidirectional maps, etc. Bijection map would get caught in there too. I've not deci

Re: [containers-users] Request for comments on BiMap

2018-02-24 Thread Drup
Why not call this "Bijection" or "BijMap" ? BiMap simply implies two maps. This a bit more specific. Le 23/02/2018 à 01:37, SP a écrit : I've started working on a BiMap, a map where (key, value) is also (value, key) in a one-to-one relationship. https://github.com/c-cube/ocaml-containers/comp

Re: [containers-users] Request for comments on BiMap

2018-02-23 Thread Simon Cruanes
>Shall I revert the order for this module, or has the "new convention" >have to be upheld? Put the map last, as is convenient for piping. -- Simon ___ Containers-users mailing list Containers-users@lists.ocaml.org http://lists.ocaml.org/listinfo/

Re: [containers-users] Request for comments on BiMap

2018-02-23 Thread SP
I think is_empty is there. Will be adding the rest you mentioned and whatever else I can think of being useful. Will also fix the signature and do the docs near the end, once the functionality is starting to solidify. On Thu, Feb 22, 2018 at 08:07:02PM -0600, Simon Cruanes wrote: - in the imple

Re: [containers-users] Request for comments on BiMap

2018-02-22 Thread Simon Cruanes
Nice! This looks pretty ok (albeit far from complete, a proper module will have to have conversion from/to lists, from/to sequences, and probably some other convenient functions such as membership testing or cardinality or is_empty). Some comments for future inclusion in containers: - The module