# SML/NJ Library Manual

#### Synopsis

**functor **`BinarySetFn`

** (**ORD_KEY**)**** : **ORD_SET

The BinarySetFn functor implements applicative sets on an ordered type. The resulting structure will satisfy the interface described in ORD_SET.

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

#### See Also

ORD_KEY, ORD_SET, ListSetFn, SplaySetFn, ORD_MAP

#### Discussion

Note that adding an element to a set that already contains such an element (in the sense that both elements are considered equal by the comparison function) causes the current element to be replaced by the new one.

**[ Top
| Parent
| Contents
| Index
| Root
]**
*Last Modified June 10, 1998*

*Comments to John Reppy*

Copyright © 1998 Bell Labs, Lucent Technologies