Skip to content

Example will not compile #2523

Description

@aleklisi

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions