-
-
Notifications
You must be signed in to change notification settings - Fork 9
Intrinsic Procedure __array__
IsaacShelton edited this page Mar 21, 2022
·
1 revision
The __array__
method can be defined in combination with __length__
to allow additional types to be used with the each-in
loop.
func __array__(this *MyArrayLike) *$T {
}
The return value is a primitive array pointer, where $T
is the element type.
The returned pointer must remain valid until the subject value is destroyed or modified.