Hmm, these are cool. This is the Monoid concept I've been working with. I think we can get away with doing type-based dispatch on records:

https://github.com/nathanmarz/cascalog/blob/feature/cascalog_two/cascalog-core/src/clj/cascalog/fluent/algebra.clj

I'm a bit hesitant to move these whole files into the Cascalog repo. It looks like we only need the mean variance function for this pull req. Can you isolate that? Sorry to push back, I just want to keep the repo as clean as we can. I really like the feature.