Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
builtin_maps
/
map_with_selector_test.v
9
lines
·
9
sloc
·
191 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
test_main() {
2
k := [10, 20, 30]
3
println(k.map(it.hex()))
4
dump(k.map(it.hex))
5
a := k.map(it.hex)
6
assert dump(a[0]()) ==
'a'
7
assert dump(a[1]()) ==
'14'
8
assert dump(a[2]()) ==
'1e'
9
}
10