I've encountered confusing behavior of Association when I try to use it for storing pure functions.
For example:
as = <|"1" -> # + 1 &|>
Association["1" -> #1 + 1 &]
Strangely:
AssociationQ@as
False
and it is not possible to extract the value by the key:
as["1"]
Association["1" -> #1 + 1 &]["1"]
Is this the intended behavior?
P.S. Wrapping pure functions in Hold[] solves the problem, but I'm still curious why doesn't Association work without it.
&
operator. Please also see: (30425) $\endgroup$