Created
July 16, 2021 13:01
-
-
Save puffnfresh/9f97177f80dd2aa51a5e48f7e61bec41 to your computer and use it in GitHub Desktop.
Get a Traversal from a Traversal1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
import Control.Lens | |
import Data.Functor.Apply | |
traversal1 | |
:: Traversal1 s t a b | |
-> Traversal s t a b | |
traversal1 t f = | |
unwrapApplicative . t (WrapApplicative . f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment