Changes between Version 71 and Version 72 of HashTablesCowan


Ignore:
Timestamp:
10/30/13 23:49:57 (4 years ago)
Author:
cowan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HashTablesCowan

    v71 v72  
    1313   * Assumes that keys are immutable; mutating a key leads to unspecified behavior. 
    1414   * Provides key lookup and destructive update in (expected) amortized constant time, provided a satisfactory hash function is available. 
    15    * Does not guarantee that whole-table operations work in the presence of concurrent mutation. 
     15   * Does not guarantee that whole-table operations work in the presence of concurrent mutation of the whole hash table (values may be mutated). 
    1616 
    1717== Issues == 
     
    340340Calls ''proc'' for every association in ''hash-table'' with three arguments: the key of the association, the value of the association, and an accumulated value ''val''.  ''Val'' is ''init'' for the first invocation of ''procedure'', and for subsequent invocations of ''procedure'', the returned value of the previous invocation.  The value returned by `hash-table-fold` is the return value of the last invocation of ''proc''.  (SRFI 69 `hash-table-fold` has the ''hash-table'' as the first argument) 
    341341 
    342 `(hash-table-filter `''comparator proc hashtable''`)` 
    343  
    344 Returns a newly allocated hash table using ''comparator''.  Calls ''proc'' for every association in ''hashtable'' with two arguments, the key and the value of the association, and enters all associations  for which ''proc'' returns true into the new hash table. 
    345  
    346 `(hash-table-partition `''comparator proc hashtable''`)` 
    347  
    348 Returns two values, both newly allocated hash tables using ''comparator''.  Calls ''proc'' for every association in ''hashtable'' with two arguments, the key and the value of the association, and enters all associations for which ''proc'' returns true into the first hash table and all other associations into the second hash table. 
     342`(hash-table-filter `''comparator proc hash-table''`)` 
     343 
     344Returns a newly allocated hash table using ''comparator''.  Calls ''proc'' for every association in ''hash-table'' with two arguments, the key and the value of the association, and enters all associations  for which ''proc'' returns true into the new hash table. 
     345 
     346`(hash-table-partition `''comparator proc hash-table''`)` 
     347 
     348Returns two values, both newly allocated hash tables using ''comparator''.  Calls ''proc'' for every association in ''hash-table'' with two arguments, the key and the value of the association, and enters all associations for which ''proc'' returns true into the first hash table and all other associations into the second hash table. 
    349349 
    350350=== Copying and conversion === 
     
    368368`(hash-table-accessor `''hash-table'' [ ''failure'' [ ''success'' ] ]`)` 
    369369 
    370 Curried version of `hash-table-ref`.  Returns a procedure of one argument, a key, which returns what `hash-table-ref` returns when invoked with the ''hashtable'' argument, the passed key, and the ''failure'' and ''success'' arguments. 
     370Curried version of `hash-table-ref`.  Returns a procedure of one argument, a key, which returns what `hash-table-ref` returns when invoked with the ''hash-table'' argument, the passed key, and the ''failure'' and ''success'' arguments. 
    371371 
    372372`(hash-table-accessor/default `''hash-table default''`)` 
    373373 
    374 Curried version of `hash-table-ref/default`.  Returns a procedure of one argument, a key, which returns what `hash-table-ref/default` returns when invoked with the ''hashtable'' argument, the passed key, and the ''default'' argument. 
     374Curried version of `hash-table-ref/default`.  Returns a procedure of one argument, a key, which returns what `hash-table-ref/default` returns when invoked with the ''hash-table'' argument, the passed key, and the ''default'' argument. 
    375375 
    376376=== Hash tables as sets ===