Difference between revisions of "Chained Dictionary Assignment"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
end</nowiki> | end</nowiki> | ||
− | = | + | =Hashtable Implementation= |
[https://en.wikipedia.org/wiki/Hash_table Hash table] | [https://en.wikipedia.org/wiki/Hash_table Hash table] |
Revision as of 15:46, 25 June 2019
signature DICTIONARY = sig type (''k,'v) dictionary val get : ((''k,'v) dictionary *''k) -> 'v option val put : ((''k,'v) dictionary *''k *'v) -> 'v option val remove : ((''k,'v) dictionary *''k) -> 'v option val entries : (''k,'v) dictionary -> (''k*'v) list val keys : (''k,'v) dictionary -> ''k list val values : (''k,'v) dictionary -> 'v list end
SingleList Implementation
signature SINGLE_LIST_DICTIONARY = sig include DICTIONARY val create_simple : unit -> (''k,'v) dictionary end
Hashtable Implementation
signature HASHED_DICTIONARY = sig include DICTIONARY type ''k hash_function = ''k -> int val create_hashed : (int * ''k hash_function) -> (''k,'v) dictionary end