stream Map Existing problem
lym169 opened this issue · comments
@lym169 This is because that go doesn't allow type parameters in methods. like below code snap:
func (s stream[T]) Map[U any](mapper func(item T) U) stream[U]
see https://www.reddit.com/r/golang/comments/tvfbow/the_fact_that_methods_are_not_allowed_to_have/
golang/go#49085
Thank you,
This can be done with interface{}, but ultimately you need to specify the type of conversion