Examples · learn/09-closures · 150 of 339
map-filter
tin run examples/learn/09-closures/map-filter.tinfn main() {
let prices = [4.0, 12.5, 7.25, 30.0]
print(prices.map((p) => p * 1.2)) // change every item
print(prices.filter((p) => p < 10.0)) // keep some items
print(prices.any((p) => p > 25.0))
print(prices.count((p) => p > 5.0))
print(prices.find((p) => p > 10.0))
}