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

Example will not compile #2523

Open
aleklisi opened this issue May 28, 2019 · 0 comments
Open

Example will not compile #2523

aleklisi opened this issue May 28, 2019 · 0 comments

Comments

@aleklisi
Copy link

aleklisi commented May 28, 2019

https://docs.riak.com/riak/kv/2.0.4/developing/app-guide/advanced-mapreduce/#reduce-function-examples
This

fun(ValueList, _Arg) ->
  [lists:foldl(fun erlang:'+'/2, 0, List)]
end.

will not compile, because List is unbound. Unless List is defined somewhere prior, but since it is not written, I assume it is not.
It should look like this:

fun(ValueList, _Arg) ->
  [lists:foldl(fun erlang:'+'/2, 0, ValueList)]
end.
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

1 participant