Skip to content

Example will not compile #2523

Open
Open
@aleklisi

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.

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