Skip to content

Instantly share code, notes, and snippets.

@fragamus
Created January 30, 2019 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fragamus/69bb9a5816f952c98f456f719b03deb7 to your computer and use it in GitHub Desktop.
Save fragamus/69bb9a5816f952c98f456f719b03deb7 to your computer and use it in GitHub Desktop.
partially applied constructor... need help grokking this code
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