Skip to content

Instantly share code, notes, and snippets.

{-# LANGUAGE NoImplicitPrelude, TypeOperators #-}
import Prelude(undefined, Either(..), either, Functor(..))
data Store a b =
Store (a -> b) a
instance Functor (Store a) where
fmap f (Store p g) =
Store (f . p) g