Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reuse fmap's input list, if output type is the same as the input type #14

Open
awalterschulze opened this issue Jul 12, 2017 · 4 comments

Comments

@awalterschulze
Copy link
Owner

No description provided.

@awalterschulze
Copy link
Owner Author

This is a performance improvement.

@rogpeppe
Copy link

I'm not sure that this is necessarily a good thing - there are arguments both ways.
It's not always OK to modify the slice that's being passed in.
I suspect that it might be better for there to be a different plugin that modifies
in place.

@awalterschulze
Copy link
Owner Author

This is why I would love to have immutability in Go, so that we don't have to make this decision, but now here we are.

@awalterschulze
Copy link
Owner Author

So you would prefer to rather have an inplace variant of fmap and filter than it being the default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants