Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Maps

< >
Example from 1 languages: JSON
{"name": "Mary"}
Example from 1 languages: Lua
myMap = { key = "value", [35] = 35, }
Example from 1 languages: Elixir
%{key: "value"}
Example from 1 languages: MoonBit
let map : Map[String, Int] = { "x": 1, "y": 2, "z": 3 }
Example from 1 languages: Wax
(let m (map str int) (alloc (map str int))) (set m "xyz" 123) (insert m "abc" 456) ; exactly same as 'set' (print (get m "xyz")) (remove m "xyz") (print (get m "xyz")) ;^ if a value is not there, the "zero" value of the element type is returned ; for numbers, 0; for compound types, null.
Example from 1 languages: Jule
let my_map: [int:str] = { 0: "Key 0", 1: "Key 1", 2: "Key 2", }
Example from 1 languages: Speedie
|| x = ["a":"Apple", "b":"Bird", "c":"Cat"] printline x["b"] // Bird
*

Languages with Maps include JSON, Lua, Elixir, EDN, MoonBit, Wax, Jule, Speedie

*

View all concepts with or missing a hasMaps measurement

*

Read more about Maps on the web: 1.

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements