[Haskell-cafe] efficient data structure: column with repeating values

Christopher Howard christopher.howard at frigidcode.com
Wed Dec 19 05:15:28 CET 2012


Is there some good data type out there that basically provides a simple
table, but with optimization for repeating values on one column?
Something like:

Data Table a b

...where it assumes that 'a' values will usually be unique, while 'b'
values will usually be repeated from a small set? (But not needing to be
fixed beforehand.)

Like in...

client | patron
---------------
Bob    | Tom
Sarah  | Tom
Dick   | Tom
George | Harry
Moe    | Harry

-- 
frigidcode.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121218/af974b16/attachment.pgp>


More information about the Haskell-Cafe mailing list