Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -0,0 +1,18 @@
|
|||
import gleam/dict
|
||||
|
||||
pub fn main() {
|
||||
// create empty dictionary
|
||||
let _ = dict.new()
|
||||
|
||||
// create dictionary from list of tuples
|
||||
let stuff = dict.from_list([#("key1", 1), #("key2", 2)])
|
||||
|
||||
// retrieve value at key
|
||||
let _ = dict.get(stuff, "key1")
|
||||
|
||||
// add key-value pair
|
||||
let _new_dict = dict.insert(stuff, "key3", 3)
|
||||
|
||||
// test key existence
|
||||
let _ = dict.has_key(stuff, "key1")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue