Skip to content
This repository was archived by the owner on Jul 25, 2018. It is now read-only.
This repository was archived by the owner on Jul 25, 2018. It is now read-only.

fix test #5

@mesteche

Description

@mesteche

In your test of the fix combinator, I think you don't actually test the combinator since f is redefined inside it's anonymous parent function. Maybe try replacing this:

const result = fix((f) => {
                return function f(n) {
                    return n === 0 ? 1 : n * f(n - 1);
                };
})(5);

with this:

const result = fix(f => n => n === 0 ? 1 : n * f(n - 1))(5);

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