d></tr></table></div></div></div><div class="doc"><p>A typical example of how to use a registry in practice 
     is the balancer pattern, which is shown (without error handling)
     below:
</p><pre> -- The definition of the variables
 -- c, n qn, mn, mx, onErr, rq
 -- is out of the scope of this listing;
 -- their data type and meaning 
 -- can be inferred from the context.

 withRegistry c n qn (mn, mx) onErr $ \reg -&gt;
   withPair c n (rq,        [], [], bytesIn) 
                (&quot;unknown&quot;,