What happens during a call?

F-CALLS-V4-2medium

Stop at the first overdue invoice

An invoice tool reads due and paid days and amounts, then reports totals, overdue invoices and fees.

What needs to change

Repair firstOverdue so it reports the first invoice that was paid late.

Reproduce

  1. Use go run on the three-invoice sample, then Check work for the other input sequences.

Acceptance criteria

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

Notes

The file contains its imports, the Invoice struct, readInvoices, daysLate, visit and main.

visit calls its function for each invoice in order and stops when that function returns false.

Sign in to open this exercise

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

Sign in