chain function

PollStrategy chain(
  1. List<PollStrategy> strategies
)

Implementation

PollStrategy chain(List<PollStrategy> strategies) {
  return (
    Principal canisterId,
    RequestId requestId,
    RequestStatusResponseStatus status,
  ) async {
    for (final a in strategies) {
      await a(canisterId, requestId, status);
    }
  };
}