Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
|
|
@ -0,0 +1,19 @@
|
|||
mydict = [ "hello"=>13, "world"=>31, "!"=>71 ]
|
||||
|
||||
# applying a function to key-value pairs:
|
||||
map(println, mydict);
|
||||
|
||||
# iterating over key-value pairs:
|
||||
for (key,value) in mydict
|
||||
println("key = $key, value = $value")
|
||||
end
|
||||
|
||||
# iterating over keys:
|
||||
for key in keys(mydict)
|
||||
println("key = $key")
|
||||
end
|
||||
|
||||
# iterating over values:
|
||||
for value in values(mydict)
|
||||
println("value = $value")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue