diff --git a/docs/system.dj b/docs/system.dj index b6abfd7..ec7c3e3 100644 --- a/docs/system.dj +++ b/docs/system.dj @@ -602,6 +602,29 @@ stroke 128 #00000004 (vec 0 0) If you try to to use this brush to fill up a single spot with black, you will notice that despite all the math suggesting so, the color will end up gray instead. +## Lists + +```haku +len + l : list _ + -> number +``` + +Returns the number of elements in the given list (its `len`gth.) + +```haku +index + l : list t + i : number + -> t +``` + +Returns an element of the list, located at the given index `i`. +The first element is located at index 0. + +Indexing out of bounds is an error. + + ## Shapes ```haku