Optional, default, and variadic parameters

F-VARIADIC-V4-3hard

Forward each message

The worker has three small entry points used by the same report delivery flow. First summarize a player’s submitted scores, including an empty submission. Then resolve each queued job’s attempt option, keeping an explicit opt-out of 0. Finally forward a batch to the existing send helper so the channel receives one notice per message, followed by an accurate sent count.

What needs to change

Repair notify and its call in main so each message reaches send on its own, with the channel used as its destination.

Reproduce

  1. Use go run on the sample alerts and compare every line with the expected stdout.

Acceptance criteria

Your review marks · Saved in this browser. Test acceptance is tracked separately.

Notes

The file contains its imports, readRows, send, notify and main. send takes messages ...any.

Input: a channel, then zero or more messages, on each line.

Each non-empty input row starts with one channel word, followed by zero or more message words.

Sign in to open this exercise

The ticket brief is public. Sign in to access the exercise. Paid exercises require Pro.

Sign in