Closed mars0i closed 10 years ago
Fixed. The problem was that utils.general/join-pairs-to-coll-map
, called by utils.general/invert-coll-map
, in turn called by popco.core.population/make-population
, used merge-with
, which does no merging or anything when there is only one value to merge. So in those cases, the value (a group id) didn't get wrapped in vector. Added an additional step in join-pairs-to-coll-map
to guarantee that this happens.
See grouptest1.clj for an example. The pundits group has only one member. The other groups have at least two. The groups hashmap in
popn
has a seq as a val for each of the group keys except pundits; the val there is simply the person id,:aa
. That can't be right.