{-# LANGUAGE MultiParamTypeClasses #-} module Data ( RW(..) ) where class RW a b where update :: (a -> a) -> b -> b set :: a -> b -> b set = update . const