Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
(doseq [[k x] mymap]
(println k ":" x))
foreach(var entry in map)
{
Console.WriteLine("Key=" + entry.Key + ", Value=" + entry.Value);
}
mymap.forEach((k, v) => print('Key=$k, Value=$v'));
Enum.each(mymap, fn({k, x}) ->
IO.puts("#{k} => #{x}")
end)
for {k, x} <- mymap do
IO.puts("#{k} => #{x}")
end
maps:fold(
fun(K, V, ok) ->
io:format("~p: ~p~n", [K, V])
end, ok, MyMap).
mymap.each { k, x ->
println "Key $k - Value $x"
}
Object.entries(mymap).forEach(([key, value]) => {
console.log('key:', key, 'value:', value);
});
for (const key in mymap) {
console.log('key:', key, 'value:', mymap[key]);
}
for (Map.Entry<Object, Object> entry : mymap.entrySet()) {
Object k = entry.getKey();
Object x = entry.getValue();
System.out.println("Key=" + k + ", Value=" + x);
}
mymap.forEach { k, v -> println("$k -> $v") }
mymap.entries.forEach { print("${it.key} ${it.value}") }
(loop for k being each hash-key of mymap
for x being each hash-value of mymap
do (format t "~A ~A~%" k x)))
for k, x in pairs(mymap) do
print('Key: '..k..', Value: '..x)
end
foreach ($mymap as $k=>$x)
{
echo "Key=$k, Value=$x <br>";
}
printf "Key=%s, Value=%s\n",$_,$mymap{$_} foreach (sort keys %mymap);
while (my ($k, $x) = each %mymap) {
print "Key=$k, Value=$x\n";
}
forall(get_dict(K, D, V),
format("~w:~w~n", [K, V]))
for k, v in mymap.items():
print(k, v)
for x in mymap.items(): print(x)
mymap.each {|k, x| puts "Key= #{k} Value=#{x}"}
val x = Map("a" -> 1, "b" -> 2, "c" -> 3)
x.foreach{ case (key, value) => println(s"$key => $value")}
mymap.foreach { case (k, x) => println(s"$k => $x") }
mymap keysAndValuesDo: [ :k :x |
Transcript cr;
show: 'Key = ', k printString;
show: ', Value = ', x printString]