![]() ![]() ![]() The List is eagerly iterated (at compile time if possible) and values in it are each type-checked and itemized. Literal Arrays are constructed with a List inside square brackets. See the section below on binding to Array slots. The fact that all elements of an array are itemized (in Scalar containers) is more a gentleman's agreement than a universally enforced rule, and it is less well enforced that typechecks in typed arrays. Use Arrays if the user is going to want to mutate the result without copying it first. Use Arrays as non-itemized lists of itemized lists, if appropriate. Use itemized lists to protect things the user probably will not want flattened. Use non-itemized lists when you want to make it easy for the user to flatten. ![]() Use Slips when you want to always merge with surrounding lists. However, not returning Arrays or itemized lists from functions, when non-itemized lists are sufficient, is something that one should consider as a courtesy to their users: Future versions of Raku might find a way to make this easier. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |