-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
This are just preliminary thoughts, but Crosswalk (with respect to Align) is not quite like Traversable (wrt Applicative).
The laws of Traversable target specific Applicative-instances, namely Identity and Compose f g:
- Identity:
traverse Identity = Identity - Composition:
traverse (g <%< f) = traverse g <%< traverse f
given this graded composition operator:
(<%<) :: Functor f => Functor g => (b -> g c) -> (a -> f b) -> (a -> Compose f g c)
g <%< f = Compose . fmap g . fThe laws of Crosswalk however just mention crosswalk (const nil) = const nil but maybe it can be written similarly? I'm curious what you think:
- Identity:
crosswalk (const Proxy) = const Proxy - Composition:
crosswalk (g <%< f) = crosswalk g <%< crosswalk f
lotz84
Metadata
Metadata
Assignees
Labels
No labels