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

Is iterateM_ incorrectly named? #7

Open
idontgetoutmuch opened this issue Jun 14, 2014 · 2 comments
Open

Is iterateM_ incorrectly named? #7

idontgetoutmuch opened this issue Jun 14, 2014 · 2 comments

Comments

@idontgetoutmuch
Copy link

Since it has type Monad m => (a -> m a) -> a -> m b shouldn't it be called iterateM?

@mokus0
Copy link
Owner

mokus0 commented Jun 27, 2014

Yes, I believe you're right. Upon thinking about this particular case I realize I've been internally using a different heuristic from what I stated in the comments - that the loop as a whole does not return anything to the point it was called. It doesn't really seem like a relevant distinction either way for this particular function, though. Like forever, the fact that it doesn't return means there's really no need to disambiguate based on what is "returned" in the first place.

I'm not sure about the best way forward... do you feel the disruption of changing it is worthwhile? My inclination is to introduce a properly-named version and deprecate the old one for a while.

@idontgetoutmuch
Copy link
Author

That would seem reasonable but obviously there is no urgency.

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

No branches or pull requests

2 participants