forEach

abstract fun forEach(action: (T) -> Unit)

对此可迭代对象中的每个元素执行给定的 action

Parameters

action

要对每个元素执行的操作。