
19 Feb
2016
19 Feb
'16
6:07 a.m.
.. a graph that described which people own which hamsters,
This is a bipartite graph, or, a relation. You want a type like data Rel src tgt a = Rel { fore :: ! ( M.Map src (M.Map tgt a) ) , back :: ! ( M.Map tgt (M.Map src a) ) } where src = People, tgt = Hamster, and a = Bool. In general, a could be some extra weight information. - J.W. cf. https://gitlab.imn.htwk-leipzig.de/waldmann/pure-matchbox/blob/master/src/Ma...