General wald-type identities for exchangeable sequences and processes