forEach

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

Performs the given action on each element and safely closes the cursor.