Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
|
|
@ -1 +1 @@
|
|||
writeln toHash w/a b c d/, [1, 2, 3, 4]
|
||||
writeln(hash fw/a b c d/, [1, 2, 3, 4])
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
val .new = foldfrom(
|
||||
f(.hash, .key, .value) more .hash, h{.key: .value},
|
||||
h{}, w/a b c d/, [1, 2, 3, 4],
|
||||
fn(.hash, .key, .value) more .hash, h{.key: .value},
|
||||
h{}, fw/a b c d/, [1, 2, 3, 4],
|
||||
)
|
||||
|
||||
writeln .new
|
||||
|
|
|
|||
20
Task/Hash-from-two-arrays/Yabasic/hash-from-two-arrays.basic
Normal file
20
Task/Hash-from-two-arrays/Yabasic/hash-from-two-arrays.basic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
data "1", "one", "2", "two", "3", "three", "4", "four", "5", "five"
|
||||
|
||||
dim keys$(5), values$(5)
|
||||
dim hash$(5)
|
||||
|
||||
for i = 1 to arraysize(keys$(), 1)
|
||||
read a$, b$
|
||||
keys$(i) = a$
|
||||
values$(i) = b$
|
||||
next i
|
||||
|
||||
for i = 1 to arraysize(values$(), 1)
|
||||
temp = val(keys$(i))
|
||||
hash$(temp) = values$(i)
|
||||
next i
|
||||
|
||||
for i = 1 to arraysize(hash$(), 1)
|
||||
print keys$(i), " ", hash$(i)
|
||||
next i
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue