Skip to content

Intrinsic Procedure __length__

IsaacShelton edited this page Mar 21, 2022 · 1 revision

'__length__' method

The __length__ method can be defined in combination with __array__ to allow additional types to be used with the each-in loop.

func __length__(this *MyArrayLike) usize {

}

The return value is the number of elements in the array returned by __array__

Clone this wiki locally