<!-- binary-map-fn.mldoc -->
<!-- Entities.sgml entry 
<!ENTITY BinaryMapFn SDATA "binary-map-fn.sml">
 -->

<!DOCTYPE ML-DOC SYSTEM>

<COPYRIGHT OWNER="Bell Labs, Lucent Technologies" YEAR=1998>
<VERSION VERID="1.0" YEAR=1998 MONTH=6 DAY=10>
<TITLE>The BinaryMapFn functor</TITLE>

<INTERFACE>
<HEAD>The <CD/BinaryMapFn/ functor</HEAD>
<SEEALSO>
  <SIGREF/ORD_KEY/
  <SIGREF/ORD_MAP/
  <FCTREF/SplayMapFn/
  <FCTREF/ListMapFn/
  <SIGREF/ORD_SET/
</SEEALSO>

<PP>
The <FCTREF NOLINK/BinaryMapFn/ functor implements applicative maps on
an ordered type. The resulting structure will satisfy
the interface described in <SIGREF/ORD_MAP/.

<PP>
The implementation is based on Stephen Adams' integer set code, which uses
binary trees of bounded balance.


<FUNCTOR FCTID="BinaryMapFn"><ID/K/<ID>ORD_KEY</ID>
  <ID>ORD_MAP
</FUNCTOR>

<PP>
Note that inserting a pair into a map that already contains a pair using
the same key (in the sense that both keys are considered equal by the comparison
function) causes the current pair to be replaced by the new one.
</INTERFACE>
