next | previous | forward | backward | up | top | index | toc | Macaulay2 web site

addHook(HashTable,Thing,Function) -- add a hook function to an object for later processing

Synopsis

Code

../../m2/methods.m2:489:56-489:125: --source code:
addHook   (HashTable,Thing,Function) := (obj,key,hook) -> (c := obj.cache; c#key = if c#?key then prepend(hook,c#key) else {hook})
../../m2/methods.m2:485:63-485:121: --source code:
addHook   (MutableHashTable,Thing,Function) := (obj,key,hook) -> obj#key = if obj#?key then prepend(hook,obj#key) else {hook}

See also