Today I Learned: I can achieve the effect of map:put($m, $k, $v) with map:merge(($m, map{$k: $v})). The benefit of map:merge is that the sequence of maps may contain an empty sequence. If $m is the empty sequence, the map:merge still succeeds.

Follow

@bibliothekapp@twitter.com points out that map:merge#1 only succeeds if the key is not already in the map -- thus it should better be map:merge((map{$k: $v}, $m))

Sign in to participate in the conversation
OpenBiblio.Social

Der Einstieg in das Mastodon-Netzwerk für Bibliotheksmenschen