title: Generalization of strong and closed profunctors
body: <p>I was looking at the classes of strong and closed profunctors:</p>
  
  <pre class="lang-hs prettyprint-override"><code>class Profunctor p where
      dimap :: (a' -&gt; a) -&gt; (b -&gt; b') -&gt; p a b -&gt; p a' b'
  class Profunctor p =&gt; Strong p where
      strong :: p a b -&gt; p (c, a) (c, b)
  class Profunctor p =&gt; Closed p where
      closed :: p a b -&gt; p (c -&gt; a) (c -&gt; b)
  </code></pre>
  
  <p>(<code>(,)</code> is a symmetric bifunctor, so it's equivalent to the definition in "profunctors" package.)</p>
  
  <p>I note both <code>(-&gt;) a</code> and <code>(,) a</code> are endofunctors. It seems <code>Strong</code> and <code>Closed</code> have a similar form:</p>
  
  <pre class="lang-hs prettyprint-override"><code>class (Functor f, Profunctor p) =&gt; C f p where
      c :: p a b -&gt; p (f a) (f b)
  </code></pre>
  
  <p>Indeed, if we look at the laws, some also have a similar form:</p>
  
  <pre class="lang-hs prettyprint-override"><code>strong . strong ≡ dimap unassoc assoc . strong
  closed . closed ≡ dimap uncurry curry . closed
  
  lmap (first f) . strong ≡ rmap (first f) . strong
  lmap (. f)     . closed ≡ rmap (. f)     . closed
  </code></pre>
  
  <p>Are these both special cases of some general case?</p>