Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add ways to turn P2 into P3 #326

Copy link
Copy link
@janbols

Description

@janbols
Issue body actions

Hi,

I'm often faced with the situation where I want to make a P2 from other P2's. I end up with something like P2<P2<A, B>, C>. As this becomes unwieldy very quick, I really want to make a P3 instead.

I don't think there currently is an easy way to do that except by explicitly calling the P3 factory method in the P class like in the following P.p(myP2._1(), myP2._2(), c).

However, I think it makes sense to add a method that turns a P2 into a P3 either by calling one of the factory methods in in fj.P like static <A,B,C> P3<A,B,C> p(P2<A,B> fst, C snd)
or by adding an extra method in fj.P2 like <C> P3<A,B,C> p(C snd).

Would that be a sensible thing to do? Should I make pull requests for these?

Greetings
Jan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.