use MyClient; my $client = MyClient.new; my $list = $client.call('ListCustomers'); $list.parse_json_payload; say "Start: Found $list.payload.totalCount() accounts"; my atomicint $ok; my atomicint $not-ok; hyper for $list.payload.items -> $account { my $id = $account.id; say "Deleting $id"; my $call = $client->call('DeleteCustomer', account_id => $id); say 'Status: ' . $call.status; $call.status == 204 ?? atomic-inc-fetch($ok) !! atomic-inc-fetch($not-ok) } say "Results: ok = $ok, not-ok = $not-ok"