vector¶
Description¶
@vector(n,x)
- initialize a vector based on
x
with the lengthn
Type Rules¶
High-level
Int, Basic -> Basic
Int, list -> list
_ , _ -> domain error
Note
Int
on the left side must be a non-negative number.
Table with details (See type alias)
Shape Rules¶
Shape determined by left value rules
Examples¶
@vector(2:i32,(-1,2,3):i32)
(-1,2):i32
@vector(5:i32,(-1,2,3):i32)
(-1,2,3,-1,2):i32