Made the continuations more general using cpsParam[A, B]