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

Add hoistCofree #73

Closed
exergasia opened this issue Jun 11, 2014 · 3 comments
Closed

Add hoistCofree #73

exergasia opened this issue Jun 11, 2014 · 3 comments

Comments

@exergasia
Copy link
Collaborator

Please forgive me if this is already defined somewhere--I couldn't find a precise match--but this function would be useful to have:

hoistCofree :: (Functor f) => (forall x . f x -> g x) -> Cofree f a -> Cofree g a
hoistCofree f (x :< y) = x :< f (hoistCofree f <$> y)
@ekmett
Copy link
Owner

ekmett commented Jun 15, 2014

Toss a patch together and i'll happily accept it.

@fumieval
Copy link
Collaborator

As it has no harm, I've just added it (a2008da).

@ekmett
Copy link
Owner

ekmett commented Aug 18, 2014

Fair enough. =)

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