From d732be64f6b93bc7f6e2ca63cc6ea13900b547a2 Mon Sep 17 00:00:00 2001 From: Don Alfons Nisnoni Date: Wed, 13 Nov 2019 00:26:05 +0800 Subject: [PATCH] array: update docs --- vlib/builtin/array.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index f68e90742b..629e64aeaa 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -155,7 +155,7 @@ fn (a array) get(i int) voidptr { return a.data + i * a.element_size } -// array.first gives the first element of the array +// array.first returns the first element of the array pub fn (a array) first() voidptr { if a.len == 0 { panic('array.first: array is empty') @@ -163,7 +163,7 @@ pub fn (a array) first() voidptr { return a.data + 0 } -// array.last gives the last element of the array +// array.last returns the last element of the array pub fn (a array) last() voidptr { if a.len == 0 { panic('array.last: array is empty')