You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -396,27 +406,28 @@ public static PineValueInProcess ConcatBinary(
396
406
/// </summary>
397
407
/// <param name="index">The zero-based index of the element to retrieve.</param>
398
408
/// <returns>
399
-
/// For list values: the element at the specified index, or <see cref="PineValue.EmptyList"/> if index is out of bounds.
400
-
/// For blob values: a single-byte blob containing the byte at the specified index, or <see cref="PineValue.EmptyBlob"/> if index is out of bounds.
409
+
/// For list values: the element at the specified index, or <see cref="EmptyList"/> if index is out of bounds.
410
+
/// For blob values: a single-byte blob containing the byte at the specified index, or <see cref="PineValueInProcess"/> wrapping <see cref="PineValue.EmptyBlob"/> if index is out of bounds.
401
411
/// </returns>
402
412
/// <remarks>
403
-
/// This method is optimized to avoid fully evaluating the value when possible, especially for slice builders.
413
+
/// This method is optimized to avoid fully evaluating the value when possible, especially for lists and slice builders.
414
+
/// Returns a <see cref="PineValueInProcess"/> to defer evaluation until needed.
404
415
/// </remarks>
405
-
publicPineValueGetElementAt(intindex)
416
+
publicPineValueInProcessGetElementAt(intindex)
406
417
{
407
418
index=
408
419
index<0?0:index;
409
420
410
421
if(_sliceBuilderis{}sliceBuilder)
411
422
{
412
-
returnsliceBuilder.GetElementAt(index);
423
+
returnCreate(sliceBuilder.GetElementAt(index));
413
424
}
414
425
415
426
if(_listis{}list)
416
427
{
417
428
if(list.Count<=index)
418
429
{
419
-
returnPineValue.EmptyList;
430
+
returnEmptyList;
420
431
}
421
432
422
433
returnlist[index];
@@ -428,19 +439,19 @@ public PineValue GetElementAt(int index)
0 commit comments