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

mean's dry run #124

Closed
thevolatilebit opened this issue Jul 11, 2022 · 1 comment
Closed

mean's dry run #124

thevolatilebit opened this issue Jul 11, 2022 · 1 comment

Comments

@thevolatilebit
Copy link

thevolatilebit commented Jul 11, 2022

I used to assume that mean(f, itr) calls f once for each of the elements of itr.

However, there is an (extra) dry run which

  • may lead to unwanted behaviour for fs that mutate the state,
  • may negatively influence the overall performance (my primary motivation).

In Slack's #helpdesk channel, it was also noted that there could be some issues with weirdly indexed arrays.

For example,

g3 = 0; mean(i -> (global g3 += 1; 1), 1:1)

results in g3 == 2.

Moreover, this behaviour is not documented.

@fredrikekre
Copy link
Contributor

See #49

@thevolatilebit thevolatilebit closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2022
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