Data update

This commit is contained in:
Ingy döt Net 2024-10-16 18:07:41 -07:00
parent 81fd053722
commit 52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions

View file

@ -0,0 +1,9 @@
// function that returns multiple values
fn foo() (int, int) {
return 2, 3
}
mut a, mut b := foo()
println("${a} and ${b}")
a, _ = foo() // to ignore particular returned values, the `_` is used
println(a)

View file

@ -0,0 +1,9 @@
// ignore values, while iterating over keys
m := {
'one': 1
'two': 2
}
for key, _ in m {
println(key)
}

View file

@ -0,0 +1,4 @@
// "it", used in filter and map
words := ['hello', 'world']
upper := words.map(it.to_upper())
println(upper)