Hello, at my previous job I remember I got a nice trick to declare a dictionary over several lines, this was nice as it was much more readable.
Something like
d: listToDict[ (`key1; value1) \
(`key2; object2) \
(`key3; value3) \
(`key4; object4) ];
So there were a trick on how to make a list of list as a dictionary and also how to use multiline commands.
The trick is usually to declare it as a list of lists, where each inner list is (key;value). Then flip it and use ! . to turn the resulting 2 lists into a dictionary. Something like
>> (!/) is nicer as (!/)() is () which is useful as a default
depends on your interpretation of nice. i’d prefer to see an exception raised during the creation of a dictionary rather than later when trying to do a lookup. but each to their own.