Wednesday, 14 August 2013

How to clear the cache for a symbol, i.e. Unset pattern-free DownValues 4

How to clear the cache for a symbol, i.e. Unset pattern-free DownValues 4

Consider this code:
ClearCache[f_] := DownValues[f] = DeleteCases[DownValues[f],
_?(FreeQ[First[#], Pattern] &)]
Question: can somebody expand on the meaning of _? before the (FreeQ...
segment? My research and understanding of the _head pattern syntax in
Mathematica have defeated me.

No comments:

Post a Comment