##`Association`/`<||>` objects are Atomic and thus unmatchable before 10.4 `AtomQ@Association[]` yields `True`. This is confusing because it is not stated anywhere in the manual. For example [tutorial/BasicObjects#15871][1] claims that only numbers (including complex ones), Strings and Symbols are atomic objects. [guide/AtomicElementsOfExpressions][2] does not mention `Association` either, neither does [guide/Associations][3]. `Association@@{a -> b, c -> d}` does not act like `association @@ {a -> b, c -> d}`, although the `FullForm` suggests it does association @@ {a -> b, c -> d} // FullForm Association @@ {a -> b, c -> d} // FullForm The `Association[]` constructor function does a non trivial job, such that the following are both `False`: MatchQ[Association[], Unevaluated@Association[]] MatchQ[Unevaluated@Association[], Association[]] Also, `MatchQ[<|x->1|>, Association[___]] === False`. > standard pattern matching inside the structure will not work. You are probably best off converting associations to rule lists before pattern matching via `Normal`: `MatchQ[Normal@<|x -> 1|>, {___}] === True`. ### Statement from WRI > It just so happens that Association is currently AtomQ, though I've > argued strongly against that fact internally, and I've got SW's say-so > that we'll change that eventually. But that doesn't have all that much > to do with pattern matching not working inside associations: we all > agree it should, it's just hard to do efficiently and we couldn't > deliver it for 10. So, to sum up: Association will not be AtomQ > forever, and it will support pattern matching eventually. There's a > correlation here, not a causation. ### Further reading https://mathematica.stackexchange.com/questions/113020/how-to-match-association https://mathematica.stackexchange.com/questions/55526/matchq-ing-associations-mma-10 [1]: http://reference.wolfram.com/language/tutorial/BasicObjects.html#15871 [2]: http://reference.wolfram.com/language/guide/AtomicElementsOfExpressions.html [3]: http://reference.wolfram.com/language/guide/Associations.html ### Fixed in 10.4 > In Mathematica 10.4, `Association` can now be used in pattern matching. > There's now also `KeyValuePattern` which is a pattern object > specifically to match elements of an Association or list of rules. https://mathematica.stackexchange.com/a/109383/6804