Created
December 2, 2018 19:55
-
-
Save fragamus/747fd299e63477bdef71c33812c3265b to your computer and use it in GitHub Desktop.
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
data Store s a = Store (s -> a) s deriving Functor | |
instance Comonad (Store s) where | |
extract (Store f s) = f s | |
duplicate (Store f s) = Store (Store f) s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment