Skip to content

Function 'compose' applies functions to array of arguments instead of apply to every argument in array #4

@mozolevsky

Description

@mozolevsky

File 4-multiple.js, line 3-4
could you use this tiny enhancement
const compose = (...fns) => (...args) => fns.reduce((args, fn) => args.map(v => fn(v)), args)

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