Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Sync extend Defer #286

Closed
johnynek opened this issue Jul 24, 2018 · 4 comments
Closed

Make Sync extend Defer #286

johnynek opened this issue Jul 24, 2018 · 4 comments

Comments

@johnynek
Copy link

now that Defer has landed in cats 1.2.0, I think Sync should extend Defer[A] with def defer[A](fa: => F[A]): F[A] = suspend(fa).

Defer is not about side effects, but suspend can also handle those, so it seems only more general, since if side effects are allowed to happen, it can't have evaluated before returning.

@alexandru
Copy link
Member

👍 can you do a PR?

@alexandru
Copy link
Member

Would be cool if this made it in 1.0.0-RC3.

Who's up for a PR?

@Avasil
Copy link

Avasil commented Aug 6, 2018

I guess I can take a look at it today @alexandru

@alexandru
Copy link
Member

👍 @Avasil go for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants