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

Add List.zip #421

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@dasch

dasch commented Oct 9, 2015

This function makes it easy to zip together two lists:

zip [1,2,3] ['a','b'] == [(1,'a'), (2,'b')]

It took me a while to figure out that zip == map2 (,). The principle of least surprise would dictate that common things have names.

Add List.zip
This function makes it easy to zip together two lists:

    zip [1,2,3] ['a','b'] == [(1,'a'), (2,'b')]
@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Oct 9, 2015

Contributor

@dasch, please read https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions for the protocol concerning suggestions of new functions for core.

In the specific case of zip, you need not even start a new list-extras. The function is already here: http://package.elm-lang.org/packages/circuithub/elm-list-extra/3.7.0/List-Extra#zip

Contributor

jvoigtlaender commented Oct 9, 2015

@dasch, please read https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions for the protocol concerning suggestions of new functions for core.

In the specific case of zip, you need not even start a new list-extras. The function is already here: http://package.elm-lang.org/packages/circuithub/elm-list-extra/3.7.0/List-Extra#zip

@dasch

This comment has been minimized.

Show comment
Hide comment
@dasch

dasch Oct 10, 2015

Okay - how would the process look for suggesting getting that function
moved into core, then? The CONTRIBUTING.md file seems to leave that part as
TBD...

As a newcomer, this is sort of frustrating.
On Fri, 9 Oct 2015 at 19:01 Janis Voigtländer notifications@github.com
wrote:

Closed #421 https://github.com/elm-lang/core/pull/421.


Reply to this email directly or view it on GitHub
https://github.com/elm-lang/core/pull/421#event-431626834.

dasch commented Oct 10, 2015

Okay - how would the process look for suggesting getting that function
moved into core, then? The CONTRIBUTING.md file seems to leave that part as
TBD...

As a newcomer, this is sort of frustrating.
On Fri, 9 Oct 2015 at 19:01 Janis Voigtländer notifications@github.com
wrote:

Closed #421 https://github.com/elm-lang/core/pull/421.


Reply to this email directly or view it on GitHub
https://github.com/elm-lang/core/pull/421#event-431626834.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Oct 10, 2015

Contributor

This is really for @evancz to answer, but these days and I guess at least another week or so he will be very busy with the Elm 0.16 release.

So I can only say what I learned in other conversations, various tickets here on the core repo, the mailing lists etc.:

There is going to be a larger overhaul of the whole of core at some point, possibly for Elm 0.17 or Elm 0.18. At that point, the various *-extras packages will be taken into account. And I guess there will also be general discussions in this repo and on the mailing list at that time, to make coherent decisions.

So the process for suggesting getting that function moved into core is to get it into a *-extras package. That can be a new one you create yourself, or it can be an existing one by someone else to which you make a pull request (for example, https://github.com/Apanatshka/elm-signal-extra is being developed that way, by collecting Signal-related extra functions by various people). Or, as I pointed out for the specific case of zip, there may be no need to do anything at all, because there is already such a *-extras package (ready for consideration when the time for the core overhaul comes) that contains it.

Hmm, I think I have more or less just repeated what is already in my earlier comment and the link I provided there. So if this is not enough information about the process, what additional information do you need? What should be added to https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions to make things clearer?

Contributor

jvoigtlaender commented Oct 10, 2015

This is really for @evancz to answer, but these days and I guess at least another week or so he will be very busy with the Elm 0.16 release.

So I can only say what I learned in other conversations, various tickets here on the core repo, the mailing lists etc.:

There is going to be a larger overhaul of the whole of core at some point, possibly for Elm 0.17 or Elm 0.18. At that point, the various *-extras packages will be taken into account. And I guess there will also be general discussions in this repo and on the mailing list at that time, to make coherent decisions.

So the process for suggesting getting that function moved into core is to get it into a *-extras package. That can be a new one you create yourself, or it can be an existing one by someone else to which you make a pull request (for example, https://github.com/Apanatshka/elm-signal-extra is being developed that way, by collecting Signal-related extra functions by various people). Or, as I pointed out for the specific case of zip, there may be no need to do anything at all, because there is already such a *-extras package (ready for consideration when the time for the core overhaul comes) that contains it.

Hmm, I think I have more or less just repeated what is already in my earlier comment and the link I provided there. So if this is not enough information about the process, what additional information do you need? What should be added to https://github.com/elm-lang/core/blob/master/CONTRIBUTING.md#adding-new-functions to make things clearer?

@dasch

This comment has been minimized.

Show comment
Hide comment
@dasch

dasch Oct 10, 2015

Thanks for taking the time to respond – I guess your description of the process is simply better :-)

dasch commented Oct 10, 2015

Thanks for taking the time to respond – I guess your description of the process is simply better :-)

bruno-cadorette referenced this pull request in bruno-cadorette/TheLambdaReactor Jan 21, 2016

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