Created
January 30, 2019 23:41
-
-
Save fragamus/69bb9a5816f952c98f456f719b03deb7 to your computer and use it in GitHub Desktop.
partially applied constructor... need help grokking this code
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 = Schmore (s -> a) s deriving Functor | |
instance Comonad (Store s) where | |
extract (Schmore f s) = f s | |
duplicate (Schmore f s) = Schmore (Schmore f) s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment