Xah Talk Show 2025-01-20 Ep608 Wolfram Language, Association List (Dictionary, Map, Hashtable)
vidthumb -CFbiTntlfU
- Timestamp
- 13:37 Janet programing language.
Association[ a -> 1, b -> 2]
AssociationMap[ Function[{x}, x] , {1,2,3} ]
AssociationMap[ Function[{x}, x^2] , {1,2,3} ]
AssociationThread[ {"a", "b" , "c"} , {1,2,3} ]
xx = Association[ "a" -> 1, "b" -> 2];
xx["b"]
xx = Association[ aa -> 1, bb -> 2];
xx[bb]
xx = Association[ aa -> 1, {x^2+ y^2/z} -> 2 ];
xx = Association[ aa -> 1, {x^2+ y^2/z} -> 2 ];
xx[ {x^2+ y^2/z} ]
xx = Association[ 1 -> 88, 2 -> 428, {1,2} -> 2 ];
xx[ {1,2} ]
Expand[ (x^2+ y^3/z)^3 ]
x^6 + y^9/z^3 + (3*x^2*y^6)/z^2 + (3*x^4*y^3)/z
xx = Association[ (x^2+ y^3/z)^3 -> 2 ]
<|(x^2 + y^3/z)^3 -> 2|>
xx = Association[
Expand[ (x^2+ y^3/z)^3 ] -> 2
]
<|
x^6 + y^9/z^3 + (3*x^2*y^6)/z^2 + (3*x^4*y^3)/z
->
2
|>
xx = Association[ 1 -> a, 2 -> b, 3 -> c, 4 -> d ];
KeySelect[ xx , EvenQ ]
xx = Association[ x -> a, x^2 -> b, 3 z -> c];
KeySelect[ xx , Function[{x}, MemberQ[ x , z, {1,Infinity} ] ] ]
MemberQ[ 3 z + {z, y^2}, z ]
MemberQ[ 3 z + {z, y^2}, z, {1,Infinity} ]
MatchQ[ x, z ]
xx = Association[ "a" -> 1, "b" -> 2];
Lookup[ xx, "b" ]
xx = Association[ aa -> 1, {bb, x^2} -> 2];