From d804b09b02b9c4a6ea6b16ae85524a704796cbc1 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 18 Aug 2024 20:28:16 -0400 Subject: Added a .length field to arrays/sets/tables, added a .max_size field to channels, and updated the API --- api/sets.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'api/sets.md') diff --git a/api/sets.md b/api/sets.md index 6dcc9ca9..850d1443 100644 --- a/api/sets.md +++ b/api/sets.md @@ -48,6 +48,15 @@ set := {10, 20, 30} = [10, 20, 30] ``` +## Length + +Set length can be accessed by the `.length` field: + +```tomo +>> {10, 20, 30}.length += 3 +``` + ## Iteration You can iterate over the items in a table like this: -- cgit v1.2.3