Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@clipperhouse
Copy link
Owner

@clipperhouse clipperhouse commented Aug 26, 2024

Add Iter() method to Segmenter and Scanner, for use with range: https://go.dev/doc/go1.23#language


New methods words.Split([]byte) and words.Scan(io.Reader) for use with range.

Originally, I’d hoped to add top-level APIs, such as words.Split. Fewer dots! But this would preclude the use of Filter and Transform. I haven’t figured out a way to support them with such an API, so just adding Iter() is safe. Perhaps I will think of something.

Top-level methods like words.Split are clean, but would preclude the use of Filter and Transform. I haven't figured out a clever to support them with Iter.

Too bad. So just offer Iter for now, purely additive.
@clipperhouse clipperhouse merged commit 4cc1a48 into master Sep 1, 2024
@clipperhouse clipperhouse deleted the iter branch September 14, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants