data class Item(val name: String) fun interface ItemSupplier { fun supply(): Item } val list: List = emptyList() val items = list.map(ItemSupplier::supply)