Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ianlancetaylor
on Aug 13, 2024
|
parent
|
context
|
favorite
| on:
Go 1.23 Released
You can use it with other functions that use iterators. For example, here is code that makes a copy of a map keeping only the even keys.
maps.Collect(xiter.Filter2(func(k, v int) bool { return k%2 == 0 }, maps.All(m)))
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: