[Map] has: [Object] | Manual
[Map] has: [Object]
Checks whether the map contains the specified value.
Note that the object gets converted to a string before
comparison. In case of a map or array this means the comparison
will be based on the serialized structure.
The example will output: True False False False False.
☞ shop := (Map new put: 'magazine' at: 'books', put: 'computer' at: 'electronics', put: 'lipstick' at: 'cosmetics' ). ✎ write: (shop has: 'computer'), end. ✎ write: (shop has: 'sausage'), end. ✎ write: (shop has: 'computers'), end. ✎ write: (shop has: 'compute'), end. ✎ write: (shop has: '2computer'), end.
Welcome to the Citrine Online Manual Pages. This online manual has been generated automatically from source code comments using the shtml.ctr script. All Citrine documentation is also available as a UNIX manual file included in the download package. These pages are just a web version of the original Citrine Programming Language User Manual and Reference Guide.
Improve this manual
You can help to improve this manual. Any help is appreciated! If you spot an error in this manual or you want to contribute, just change the corresponding comment in the original Citrine Programming Language source code hosted on github and create a 'Pull Request'. After the documentation generation script has been invoked again the manual pages will be updated to reflect your contribution and so will these online manual pages.
Citrine is an easy to use programming language for everyone. Citrine is so simple it does not even need special syntax for loops or conditions. You can learn Citrine in just a couple of minutes. Citrine makes programming fun again! Visit the homepage for a quick tutorial.