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

Clarify documentation for Task.async_stream/5 #5656

Closed
Dalgona opened this Issue Jan 14, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@Dalgona

Dalgona commented Jan 14, 2017

Environment

  • Elixir & Erlang versions (elixir -v):

    Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
    
    Elixir 1.4.0
    
  • Operating system:

    Debian GNU/Linux 8.5 (jessie)

Current behavior

The documentation for Task.async_stream/5 says:

tasks.ex:288:
Each item will be appended to the given args and processed by its own task.

And I simply guessed each item in the enumerable will be appended so that the item becomes the last item of args. But when I actually tried this function, I saw the item had been passed as the first argument to the given function, and it makes me a little bit confused.

Expected behavior

I am quite new to functional programming languages, and the word "appending" may have different meaning in this world. But whether it's intended or not, I think this still needs to be clarified by using the opposite word, or by adding some additional explanation.

@josevalim

This comment has been minimized.

Show comment
Hide comment
@josevalim

josevalim Jan 14, 2017

Member

Oops, the documentation is wrong. Such a small but confusing mistake. I will fix it in master and v1.4, thank you for reporting! ❤️

Member

josevalim commented Jan 14, 2017

Oops, the documentation is wrong. Such a small but confusing mistake. I will fix it in master and v1.4, thank you for reporting! ❤️

@josevalim josevalim closed this Jan 14, 2017

josevalim added a commit that referenced this issue Jan 14, 2017

josevalim added a commit that referenced this issue Jan 14, 2017

appended -> prepended, closes #5656
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
@Dalgona

This comment has been minimized.

Show comment
Hide comment
@Dalgona

Dalgona Jan 14, 2017

Thank you!

Dalgona commented Jan 14, 2017

Thank you!

AndrewDryga added a commit to AndrewDryga/elixir that referenced this issue Jan 28, 2017

ckampfe added a commit to ckampfe/elixir that referenced this issue Jul 22, 2017

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