Correct output

"Puce -> 3.5" was added to myHash before Keys[mhHash] and Values[myHash]
This commit is contained in:
rgxgr 2019-07-02 10:13:37 +08:00 committed by GitHub
parent 84cb0e8899
commit 65fe237129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,8 +123,8 @@ myHash[["Green"]] (* 2, use it *)
myHash[["Green"]] := 5 (* 5, update it *) myHash[["Green"]] := 5 (* 5, update it *)
myHash[["Puce"]] := 3.5 (* 3.5, extend it *) myHash[["Puce"]] := 3.5 (* 3.5, extend it *)
KeyDropFrom[myHash, "Green"] (* Wipes out key Green *) KeyDropFrom[myHash, "Green"] (* Wipes out key Green *)
Keys[myHash] (* {Red} *) Keys[myHash] (* {Red, Puce} *)
Values[myHash] (* {1} *) Values[myHash] (* {1, 3.5} *)
(* And you can't do any demo of Wolfram without showing this off *) (* And you can't do any demo of Wolfram without showing this off *)
Manipulate[y^2, {y, 0, 20}] (* Return a reactive user interface that displays y^2 Manipulate[y^2, {y, 0, 20}] (* Return a reactive user interface that displays y^2