async icon indicating copy to clipboard operation
async copied to clipboard

Allow `traverse` to return enumerator.

Open ioquatix opened this issue 3 years ago • 0 comments

Do you mind explaining the expected use case? Because we have traverse which is very close to the implementation.

If I recall, I was using #traverse to return a collection of nodes, like .traverse.map { |node, value| would but got a LocalJumpError. In retrospect, I think I should have proposed an return enum_for(__method__) { size } unless block_given? form for #traverse rather than a new method.

Originally posted by @havenwood in https://github.com/socketry/async/pull/55#issuecomment-858750717

ioquatix avatar Jun 14 '21 02:06 ioquatix