Add folding functions for first and variance