PreviousUpNext

14.4.119  Typelocked_Hashtable

The standard library Typelocked_Hashtable api defines access to hashtables specialized to a particular key type.

The Typelocked_Hashtable api is implemented by the int_hashtable, unt_hashtable and quickstring_hashtable packages.

The Typelocked_Hashtable api source code is in src/lib/src/typelocked-hashtable.api.

The above information is manually maintained and may contain errors.

api {   package key
          : api {
                Hash_Key;
                hash_value : Hash_Key -> Unt;
                same_key : (Hash_Key , Hash_Key) -> Bool;};;
    Hashtable X;
    make_hashtable : {not_found_exception:Exception, size_hint:Int} -> Hashtable(X );
    clear : Hashtable(X ) -> Void;
    set : Hashtable(X ) -> (key::Hash_Key , X) -> Void;
    contains_key : Hashtable(X ) -> key::Hash_Key -> Bool;
    get : Hashtable(X ) -> key::Hash_Key -> X;
    find : Hashtable(X ) -> key::Hash_Key -> Null_Or(X );
    drop : Hashtable(X ) -> key::Hash_Key -> Void;
    get_and_drop : Hashtable(X ) -> key::Hash_Key -> Null_Or(X );
    vals_count : Hashtable(X ) -> Int;
    vals_list : Hashtable(X ) -> List(X );
    keyvals_list : Hashtable(X ) -> List(((key::Hash_Key , X)) );
    apply : (X -> Void) -> Hashtable(X ) -> Void;
    keyed_apply : ((key::Hash_Key , X) -> Void) -> Hashtable(X ) -> Void;
    map : (X -> Y) -> Hashtable(X ) -> Hashtable(Y );
    keyed_map : ((key::Hash_Key , X) -> Y) -> Hashtable(X ) -> Hashtable(Y );
    fold : ((X , Y) -> Y) -> Y -> Hashtable(X ) -> Y;
    foldi : ((key::Hash_Key , X , Y) -> Y) -> Y -> Hashtable(X ) -> Y;
    map_in_place : (X -> X) -> Hashtable(X ) -> Void;
    keyed_map_in_place : ((key::Hash_Key , X) -> X) -> Hashtable(X ) -> Void;
    filter : (X -> Bool) -> Hashtable(X ) -> Void;
    keyed_filter : ((key::Hash_Key , X) -> Bool) -> Hashtable(X ) -> Void;
    copy : Hashtable(X ) -> Hashtable(X );
    bucket_sizes : Hashtable(X ) -> List(Int );};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext