adapt internals of summarise to lazyeval