Skip to content

Swap functions to data last #27

@brandonjpierce

Description

@brandonjpierce

e.g. instead of

function toDigits(value, precision) {}

do

function toDigits(precision, value) {}

this way we can either auto curry this function or have it curried by default e.g.

const toDigit = (precision) => (value) => ...
// or
const curriedToDigit = autoCurry(toDigit);

and then in userland:

const toTenths = toDigit(2);
const value = toTenths(1.1234);

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorA code change that neither fixes a bug nor adds a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions