A transform stage computes a new value for each input item.

Program

Play the program to subtract the selected discount from each price.

transform_prices.dart
void main() {
  var prices = [10, 25, 40];
  var discount = ;
  var net = <int>[];
  for (var price in prices) {
    net.add(price - discount);
  }
  print('net=${net.join(",")}');
}
void main() {
  var prices = [10, 25, 40];
  var discount = ;
  var net = <int>[];
  for (var price in prices) {
    net.add(price - discount);
  }
  print('net=${net.join(",")}');
}
list `[10, 25, 40]` creates an ordered list.
transform `price - discount` computes one output per input.
typed list `<int>[]` creates an empty integer list.