From f298159a2bac2932208907f6319a0ba80b2721c6 Mon Sep 17 00:00:00 2001 From: nbelakovski Date: Sat, 10 Feb 2024 18:52:39 -0800 Subject: [PATCH 1/2] Add a note about lists values.md There's probably more that can be said, but I thought it might be helpful to put something here about how to access elements of a list for folks coming from more or less any other programming language. If this is rarely used, it might be nice to add to the documentation something about why it's rarely used. --- doc/manual/src/language/values.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/manual/src/language/values.md b/doc/manual/src/language/values.md index aea68a441..99dc0245d 100644 --- a/doc/manual/src/language/values.md +++ b/doc/manual/src/language/values.md @@ -156,6 +156,8 @@ function and the fifth being a set. Note that lists are only lazy in values, and they are strict in length. +Elements in a list can be accessed using `builtins.elemAt`. + ## Attribute Set An attribute set is a collection of name-value-pairs (called *attributes*) enclosed in curly brackets (`{ }`). From 4496a4537b56d69c7227088c4174a1ecbedd2ed5 Mon Sep 17 00:00:00 2001 From: nbelakovski Date: Sun, 11 Feb 2024 22:52:49 -0800 Subject: [PATCH 2/2] Update values.md Link to elemAt --- doc/manual/src/language/values.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual/src/language/values.md b/doc/manual/src/language/values.md index 99dc0245d..74ffc7070 100644 --- a/doc/manual/src/language/values.md +++ b/doc/manual/src/language/values.md @@ -156,7 +156,7 @@ function and the fifth being a set. Note that lists are only lazy in values, and they are strict in length. -Elements in a list can be accessed using `builtins.elemAt`. +Elements in a list can be accessed using [`builtins.elemAt`](./builtins.md#builtins-elemAt). ## Attribute Set