Can taking and dropping be changed to work on indexed traversals/folds, too? #97

Closed
ekmett opened this Issue Nov 19, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@ekmett
Owner

ekmett commented Nov 19, 2012

No description provided.

@ghost ghost assigned ekmett Nov 21, 2012

@ekmett

This comment has been minimized.

Show comment Hide comment
@ekmett

ekmett Nov 23, 2012

Owner

I haven't had much success in genericizing functions to work with both their indexed and non-indexed variants, so I created this issue to keep alive the desire to retire many of the ifoo variants of common functions.

Owner

ekmett commented Nov 23, 2012

I haven't had much success in genericizing functions to work with both their indexed and non-indexed variants, so I created this issue to keep alive the desire to retire many of the ifoo variants of common functions.

@ekmett

This comment has been minimized.

Show comment Hide comment
@ekmett

ekmett Dec 7, 2012

Owner

Does the idiom we developed for working with Isoid and Prismoid generalize to Indexed some how?

Owner

ekmett commented Dec 7, 2012

Does the idiom we developed for working with Isoid and Prismoid generalize to Indexed some how?

@pthariensflame

This comment has been minimized.

Show comment Hide comment
@pthariensflame

pthariensflame Dec 7, 2012

Collaborator

My feeble attempt at solving the same problem in Lentil may be of use; in Haskell, it might look something like:

class Category cat => IndexedCategory cat ixcat where
    toIndexed :: cat (i -> a) b -> ixcat i a b
    dropIndex :: ixcat i a b -> cat a b
    icompose :: (i -> j -> k) -> ixcat i b c  -> ixcat j a b -> ixcat k a c
Collaborator

pthariensflame commented Dec 7, 2012

My feeble attempt at solving the same problem in Lentil may be of use; in Haskell, it might look something like:

class Category cat => IndexedCategory cat ixcat where
    toIndexed :: cat (i -> a) b -> ixcat i a b
    dropIndex :: ixcat i a b -> cat a b
    icompose :: (i -> j -> k) -> ixcat i b c  -> ixcat j a b -> ixcat k a c
@ekmett

This comment has been minimized.

Show comment Hide comment
@ekmett

ekmett Jan 5, 2013

Owner

These have been generalized in 3.8.

Owner

ekmett commented Jan 5, 2013

These have been generalized in 3.8.

@ekmett ekmett closed this Jan 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment