Skip to content

Conversation

@7h3kk1d
Copy link
Member

I'm still not sure this is the right thing to add since it's so easy to pass pure#apply at the call site. It might be better to have an interface method on MonadReader so you don't need to pass the pure.

Comment on lines +216 to +217
//noinspection Convert2MethodRef
return readerT(a -> pureM.apply(a));
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I'm not sure why this was necessary to make it compile under java 1.8.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, pretty unfortunate. You can ascribe the type of the apply or the ReaderT, but either way you have to suppress a warning so dealer's choice.

Comment on lines +216 to +217
//noinspection Convert2MethodRef
return readerT(a -> pureM.apply(a));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, pretty unfortunate. You can ascribe the type of the apply or the ReaderT, but either way you have to suppress a warning so dealer's choice.

@jnapejnape merged commit 5e73e1f into palatable:masterMar 11, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@7h3kk1d@CorwinTanner@jnape