4.17 GHRFunc

Callback: GHRFunc

A procedure given for it is called as (procedure key value) ⇒ %return.

Specifies the type of the function passed to hash-table:find, hash-table:foreach-remove, and hash-table:foreach-steal.

The function is called with each key/value pair, together with the user-data parameter passed to the calling function.

The function should return true if the key/value pair should be selected, meaning it has been found or it should be removed from the <GHashTable>, depending on the calling function.

key

Passed: a foreign pointer, or #f.

a key

value

Passed: a foreign pointer, or #f.

the value associated with the key

%return

Returned: a boolean.

true if the key/value pair should be selected, and false otherwise

user-data

Not passed: it is the user data that guile-gi supplied.

user data passed to the calling function