Genericized runlength and the expression functions.