[Haskell-cafe] Harder than you'd think
marco-oweber at gmx.de
Sun Jun 13 09:15:43 EDT 2010
> What I ended up writing is this:
> lookup :: KeyID -> Key -> Container -> Maybe Value
> Does anybody have a less-insane way of doing this?
type MyMap = Map (KeyID, Key) Value
Don't use multiple keys. Put the keys into a tuple and use that as key.
Let me know whether this is what you were looking for.
I tried writing something like this. Yet SQL gives all this stiff for
free. I still wonder which is the nicest way to express this data in
Haskell without coding everything yourself..
More information about the Haskell-Cafe