Skip to content

is it correct? #46

@vinnitu

Description

@vinnitu

return pairs(xs).reduce((y, [x1, x2]) => (x2 - x1) + y, 0) / xs.length;

maybe you mean?

function averageDifference(xs) {
  return pairs(xs).reduce((y, [x1, x2]) => (x2 - x1) + y, 0) (xs.length - 1);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions