Skip to content

Chapter 10, Part Laws. We don't need liftA2(concat). #628

Open
@alisajadih

Description

@alisajadih

In chapter 10 on part laws. there is a code that demonstrates "applicatives are close under composition".

const tOfM = compose(Task.of, Maybe.of);
liftA2(liftA2(concat), tOfM('Rainy Days and Mondays'), tOfM(' always get me down'));
// Task(Maybe(Rainy Days and Mondays always get me down))

I think we could remove liftA2 wrapper for concat function, It's useless.
liftA2(concat, tOfM('Rainy Days and Mondays'), tOfM(' always get me down'));

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