Denis Koroskin:I found the following to work fine: K[V] assocArray = createAssocArray(); K[V] createAssocArray() { K[V] assocArray = [ k1: v1, k2: v2, ... ]; return assocArray; }Thank you for your answer. But I need to compute it, so I don't have just an AA literal. And I'd like it to be immutable :-)Bye, bearophile
Compute mutable copy and then cast to immutable. Am I missing something?