10 lines
271 B
Standard ML
10 lines
271 B
Standard ML
|
|
functor IntMapTable (type key
|
||
|
|
val getInt: key -> int) : TABLE =
|
||
|
|
struct
|
||
|
|
type key=key
|
||
|
|
type 'a table = 'a IntBinaryMap.map
|
||
|
|
val empty = IntBinaryMap.empty
|
||
|
|
fun enter(t,k,a) = IntBinaryMap.insert(t,getInt k,a)
|
||
|
|
fun look(t,k) = IntBinaryMap.find(t,getInt k)
|
||
|
|
end
|