Closed
Description
There are a handful of operations on arrays that are not well-supported today. While you can define arrays statically and generate them dynamically with comprehensions, it becomes difficult to perform certain operations like concatenating and slicing. The workarounds for these operations are overly complex and perform poorly.
We should add the following set of built-ins to operate on arrays:
slice([1,2,3,4], 1, 3) = [2,3]
concat([1,2,3], [4,5]) = [1,2,3,4,5]
Note that concat
is already used for string concatenation. If we want to use the same name we need to add support for overloading in the type checker.
Metadata
Assignees
Labels
No labels